/* Wiki Jedi. Cree par Pote.
   -------------------------------------------------------------------------
   Une page calme, dans un brun chaud et sombre. Beaucoup d'air, coins
   arrondis, titres en Lora et texte en Mulish. Aucune lueur, aucune animation
   en boucle : la page se lit.

   Fraunces a ete abandonne : la panse de son J descend sous la ligne de base
   et se faisait couper dans les grands titres.

   L'en-tete ne bouge pas ; les quatre rubriques sont des onglets, juste en
   dessous, et leur contenu s'ouvre sous eux.

   La variable --voie porte la couleur de la branche courante : vert Consulaire,
   bleu Gardien, or Sentinelle, assombris pour rester lisibles sur du papier.
   ------------------------------------------------------------------------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --nuit:      #1E1A15;   /* le fond de la page : un brun chaud, presque noir */
  --nuit-haut: #221D17;
  --surface:   #2A241C;   /* les cartes */
  --surface2:  #332C22;
  --trait:     #433A2C;
  --trait-fin: #372F25;

  --encre:      #F2EADC;  /* le texte fort */
  --encre-doux: #C0B4A1;
  --encre-pale: #8E8272;

  --sceau:      #8FB98C;  /* le vert de l'Ordre, en sourdine */
  --sceau-pale: #26301F;

  --voie: var(--sceau);

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Mulish", "Segoe UI", Helvetica, Arial, sans-serif;

  --r-carte: 18px;
  --r-doux:  10px;
  --ombre:   0 1px 2px rgba(0, 0, 0, .25), 0 12px 28px -18px rgba(0, 0, 0, .8);
  --colonne: 940px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--nuit);
  color: var(--encre-doux);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   En-tete : il ne bouge plus, il pose le lieu
   -------------------------------------------------------------------------- */
.chapeau {
  max-width: var(--colonne);
  margin: 0 auto;
  padding: 4.5rem 2rem 2.6rem;
  text-align: center;
}
.embleme {
  width: 132px;
  height: 132px;
  margin: 0 auto 1.8rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--trait);
  display: flex;
  align-items: center;
  justify-content: center;
}
.embleme img { width: 74%; height: 74%; display: block; }

.titre-site {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5.6vw, 3.6rem);
  font-weight: 400;
  line-height: 1.24;
  padding-bottom: .08em;
  color: var(--encre);
  margin-bottom: .5rem;
}
.sous-titre { font-size: 1rem; color: var(--encre-pale); }
.devise {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--encre-doux);
  max-width: 34ch;
  margin: 1.6rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--trait);
}

/* --------------------------------------------------------------------------
   Onglets : ils ouvrent leur rubrique juste en dessous
   -------------------------------------------------------------------------- */
.onglets {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .8rem 1rem;
  background: rgba(30, 26, 21, .93);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--trait-fin);
}
.onglets a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--encre-doux);
  text-decoration: none;
  padding: .4rem 1.2rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.onglets a:hover { background: rgba(242, 234, 220, .07); color: var(--encre); }
.onglets a.actif { background: var(--encre); color: var(--nuit); font-weight: 700; }

/* Le fondu a l'ouverture d'un onglet : discret, et jamais un deplacement. */
.panneau.entre { animation: fondu .32s ease both; }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------------
   Tete de rubrique
   -------------------------------------------------------------------------- */
.tete-rubrique { max-width: var(--colonne); margin: 0 auto; padding: 3.4rem 2rem 0; }
.titre-rubrique {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  font-weight: 400;
  line-height: 1.24;
  padding-bottom: .06em;
  color: var(--encre);
  margin-bottom: 1rem;
  text-wrap: balance;
}
.intro-rubrique { font-size: 1.08rem; max-width: 66ch; margin-bottom: 1.8rem; }
.intro-rubrique strong { color: var(--encre); font-weight: 700; }
.accroche { font-size: 1.15rem; margin-bottom: 2.2rem; }

/* --------------------------------------------------------------------------
   Raccourcis de l'accueil
   -------------------------------------------------------------------------- */
.raccourcis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.raccourci {
  display: block;
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.raccourci:hover { border-color: var(--sceau); box-shadow: var(--ombre); transform: translateY(-2px); }
.raccourci-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--sceau);
  margin-bottom: .7rem;
}
.raccourci-titre {
  display: block;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--encre);
  margin-bottom: .2rem;
}
.raccourci-desc { display: block; font-size: .95rem; color: var(--encre-pale); line-height: 1.55; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
section {
  max-width: var(--colonne);
  margin: 0 auto;
  padding: 3.8rem 2rem;
  border-bottom: 1px solid var(--trait-fin);
}
.tete-section { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; }
.num-section { font-family: var(--serif); font-size: 1.05rem; color: var(--voie); flex-shrink: 0; }
.titre-section {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 400;
  color: var(--encre);
  line-height: 1.2;
}
.ligne-section { flex: 1; height: 1px; min-width: 16px; background: var(--trait); }
.compte-section { font-size: .86rem; color: var(--encre-pale); flex-shrink: 0; white-space: nowrap; }

.intro-section { font-size: 1.04rem; max-width: 68ch; margin-bottom: 1.9rem; }
.intro-section strong { color: var(--encre); font-weight: 700; }

.note {
  background: var(--sceau-pale);
  border-radius: var(--r-carte);
  padding: 1.2rem 1.5rem;
  margin-top: 2rem;
  font-size: 1rem;
  max-width: 68ch;
  color: #C3D9BE;
}
.note strong { color: var(--encre); font-weight: 700; }

/* --------------------------------------------------------------------------
   Cartes (pouvoirs, formes)
   -------------------------------------------------------------------------- */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.carte {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  padding: 1.35rem 1.5rem 1.5rem;
  transition: border-color .18s, box-shadow .18s;
}
.carte:hover { border-color: var(--voie); box-shadow: var(--ombre); }
.carte-tete { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: .75rem; }
.carte h3, .escalier h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--encre);
  line-height: 1.25;
}
.carte p, .escalier p { font-size: .98rem; line-height: 1.65; color: var(--encre-doux); }

.badge {
  flex: none;
  font-size: .8rem;
  font-weight: 600;
  color: var(--voie);
  background: var(--surface2);
  border: 1px solid var(--trait);
  border-radius: 999px;
  padding: .1rem .7rem;
  white-space: nowrap;
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.chip {
  font-size: .85rem;
  color: var(--encre);
  background: var(--surface2);
  border: 1px solid var(--trait-fin);
  border-radius: var(--r-doux);
  padding: .12rem .62rem;
  font-variant-numeric: tabular-nums;
}
.chip .cle {
  color: var(--encre-pale);
  margin-right: .45rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Recherche
   -------------------------------------------------------------------------- */
.recherche {
  max-width: var(--colonne);
  margin: 2.2rem auto 0;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.recherche input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: 999px;
  padding: .7rem 1.2rem;
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1rem;
}
.recherche input::placeholder { color: var(--encre-pale); }
.recherche input:focus {
  outline: none;
  border-color: var(--sceau);
  box-shadow: 0 0 0 3px rgba(143, 185, 140, .2);
}
.compte { font-size: .9rem; color: var(--encre-pale); white-space: nowrap; }

/* --------------------------------------------------------------------------
   Accueil : echelle des paliers, voies, encarts
   -------------------------------------------------------------------------- */
.echelle { list-style: none; counter-reset: palier; }
.echelle li {
  counter-increment: palier;
  position: relative;
  padding: 0 0 1.8rem 3rem;
  border-left: 1px solid var(--trait);
  margin-left: 1rem;
}
.echelle li:last-child { border-left-color: transparent; padding-bottom: 0; }
.echelle li::before {
  content: counter(palier);
  position: absolute;
  left: -1rem;
  top: .1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--voie);
  color: var(--voie);
  font-family: var(--serif);
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.echelle h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--encre);
  margin: 0 0 .2rem;
}
.echelle p { font-size: 1rem; }

.grille-voies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.voie {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-top: 3px solid var(--voie);
  border-radius: var(--r-carte);
  padding: 1.6rem;
}
.voie h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--encre); }
.voie .devise-voie {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--voie);
  margin: .15rem 0 .9rem;
}
.voie p { font-size: .97rem; line-height: 1.65; }

.grille-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.info {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  padding: 1.4rem 1.5rem;
}
.info h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--encre);
  margin-bottom: .35rem;
}
.info p { font-size: .96rem; line-height: 1.62; }
/* Les deux barres du HUD gardent leur couleur reelle : bleu ce qu'on lance,
   rouge ce qu'on subit. C'est une information, pas une decoration. */
.info.tonalite-bleu { border-top: 3px solid #8CB0E0; }
.info.tonalite-rouge { border-top: 3px solid #D9776B; }

/* --------------------------------------------------------------------------
   Competences : l'ordre d'achat est impose, donc un escalier numerote
   -------------------------------------------------------------------------- */
.escalier { list-style: none; display: flex; flex-direction: column; gap: .8rem; }
.escalier li {
  display: flex;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  padding: 1.3rem 1.5rem;
}
.escalier .rang {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--trait);
  color: var(--voie);
  font-family: var(--serif);
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.escalier .rang-corps { flex: 1; min-width: 0; }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
footer {
  max-width: var(--colonne);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  font-size: .92rem;
  color: var(--encre-pale);
}
.pied-embleme {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--trait);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .6;
}
.pied-embleme img { width: 74%; height: 74%; display: block; }

/* --------------------------------------------------------------------------
   Petites largeurs
   -------------------------------------------------------------------------- */
@media (max-width: 880px) {
  .raccourcis, .grille-voies { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .chapeau { padding: 3rem 1.1rem 2rem; }
  .embleme { width: 104px; height: 104px; }
  .onglets { gap: .2rem; padding: .6rem .5rem; }
  .onglets a { font-size: .92rem; padding: .35rem .8rem; }
  section, .tete-rubrique, footer { padding-left: 1.1rem; padding-right: 1.1rem; }
  .recherche { padding: 0 1.1rem; }
  section { padding-top: 2.8rem; padding-bottom: 2.8rem; }
  .grille-cartes { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panneau.entre { animation: none; }
  .carte, .raccourci, .onglets a { transition: none; }
}
