.container.shadow.bg-light {
    padding-bottom: 2rem; /* Ajuste si besoin, 2rem = ~32px */
}
.zoomable {
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.zoomed {
    transform: scale(1.3);
    cursor: zoom-out;
    z-index: 10;
    position: relative;
}

.img-hover-zoom {
    transition: transform 0.3s ease;
}

.img-hover-zoom:hover {
    transform: scale(1.03);
}

a.no-style {
    text-decoration: none;
    color: inherit;
}
.timeline-container {
    width: 100%;
    overflow-x: auto;       /* Scroll horizontal */
    overflow-y: hidden;     /* Pas de scroll vertical */
    padding: 20px 0;
}

.timeline {
    position: relative;
    min-width: 1550px;      /* Plus grand = plus de place */
    height: 400px;          /* Moins haut = plus compact */
    display: flex;
    justify-content: flex-start;
    gap: 120px;             /* ← Espacement horizontal augmenté */
    padding: 0 40px;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #3498db;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-event {
    position: relative;
    flex-shrink: 0;
    z-index: 2;
}

/* Bulles d'événements */
.event-bubble {
    position: absolute;
    width: 160px;
    background: #fff;
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.event-bubble::before {
    content: '';
    position: absolute;
    left: 20px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.event-bubble.top {
    bottom: 65%;
    margin-bottom: 5px; /* Réduit l’écart vertical */
}

.event-bubble.top::before {
    top: 100%;
    border-top-color: #3498db;
}

.event-bubble.bottom {
    top: 65%;
    margin-top: 5px; /* Réduit l’écart vertical */
}

.event-bubble.bottom::before {
    bottom: 100%;
    border-bottom-color: #3498db;
}

.event-bubble.top::after,
.event-bubble.bottom::after {
    content: '';
    position: absolute;
    left: 18%;
    transform: translateX(-50%);
    width: 2px;
    background-color: #3498db;
    z-index: -1; /* pour passer sous la bulle */
}

.event-bubble.top::after {
    top: 100%;
    height: 69px; /* longueur du trait à ajuster */
}

.event-bubble.bottom::after {
    bottom: 100%;
    height: 69px; /* longueur du trait à ajuster */
}
.event-date {
    font-weight: bold;
    color: #3498db;
    margin-bottom: 4px;
    font-size: 14px;
}

.event-text {
    font-size: 13px;
}

.timeline-event a {
  color: inherit;
  text-decoration: none;
}

.timeline-event a:hover .event-bubble {
  opacity: 0.9;
  cursor: pointer;
}

.parchemin{
    background-image: url('libs/img/parchemin.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    max-width: 1000px;
    height: 70vh;
    margin: auto;
    padding: 2rem;
    overflow-y: auto;
    border: 2px solid #a67c52;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    color: #2c1b10;
    background-color: #fdf5e6e0;
    border-radius: 10px;
    font-family: 'Cinzel', serif;
}

.parchemin::-webkit-scrollbar {
    width: 8px;
}
.parchemin::-webkit-scrollbar-thumb {
    background-color: #b18a6f;
    border-radius: 4px;
}

.avatar-defaut {
    width: 60px;
    height: 60px;
    background-color: black;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #000;
}

.autocomplete-results {
    position: absolute;
    z-index: 1000;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
}

.autocomplete-item {
    padding: 0.5rem;
    cursor: pointer;
}

.autocomplete-item:hover {
    background-color: #f8f9fa;
}

.selected-personnages span {
    margin-right: 5px;
}

input[type="file"] {
    margin-bottom: 10px;
}

.canvas-container {
    position: relative;
    width: 500px;
    height: 500px;
    border: 1px solid #ccc;
}

#imageCanvas {
    display: block;
    width: 500px;
    height: 500px;
}

#selectionBox {
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 70px;
    background-color: rgba(0, 123, 255, 0.3);
    border: 2px solid #007bff;
    cursor: move;
    display: none;
    box-sizing: border-box;
}

#resizer {
    position: absolute;
    width: 10px;
    height: 10px;
    right: 0;
    bottom: 0;
    background-color: #007bff;
    cursor: se-resize;
}

.preview-container {
    margin-top: 20px;
}

.slide-container {
  min-height: 400px; /* ou ce que tu veux comme hauteur minimale */
}
.possessions-card {
    min-height: 300px; /* Ajuste cette valeur pour “doubler” la hauteur visible */
}

.equipement-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;     /* l’icône garde ses proportions */
  padding: 10px;           /* espace autour de l’icône */
  border-radius: 8px;      /* coins arrondis */
  background-color: #f0f0f0; /* gris clair */
}

.square-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;         /* carré */
  overflow: hidden;
  border: 1px solid var(--bs-secondary);
  border-radius: .25rem;
}
/* rogne en bas, garde le haut */
.bg-cover-top {
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

.attr-gauge{
  position: relative;
  height: 20px;               /* hauteur de la jauge */
  background: #2b2b2b;        /* fond de la jauge */
  border-radius: .375rem;      /* ~ .rounded */
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.attr-gauge-fill{
  height: 100%;
  transition: width .08s linear;
}
.attr-gauge-handle{
  position: absolute;
  top: -4px;                   /* petite barre qui dépasse un peu */
  width: 2px;
  height: 28px;
  background: rgba(255,255,255,.6);  /* gris clair */
  transform: translateX(-1px);       /* centre la barre sur la position */
  pointer-events: none;
}


/* Icône en petit aperçu (sous upload) */
#persoPreviewCanvas{
  display:block;
  margin:10px auto;
}

.perso-canvas-container { position: relative; display: inline-block; }
#persoSelectionBox{
  position: absolute;
  display: none;          /* will be set to block in JS */
  border: 2px dashed #6c757d;
  background: transparent;
  cursor: move;
  box-sizing: content-box;
  z-index: 5;             /* make sure it's over the canvas */
}

/* Container stays relative */
.perso-canvas-container {
  position: relative;
  display: inline-block;
}

/* Do NOT scale the canvas in CSS; JS sets exact width/height */
#persoImageCanvas {
  display: block;
  /* no max-height/width here */
}

/* Crop box (on top of the canvas) */
#persoSelectionBox {
  position: absolute;
  display: none;                /* shown by JS after load */
  border: 2px dashed #6c757d;
  background: rgba(108,117,125,.12); /* faint fill so you can see it */
  cursor: move;
  box-sizing: content-box;
  z-index: 5;
}

#persoResizer {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #6c757d;
  cursor: nwse-resize;
  z-index: 6;
}

.perso-addimage-thumb{
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 18px 18px;
  border: 2px dashed rgba(255,255,255,.35);
  border-radius: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .15s ease;
}

.perso-addimage-thumb:hover{
  border-color: rgba(13,110,253,.9);
  background-color: rgba(13,110,253,.08);
}

.perso-addimage-inner{
  text-align: center;
  color: rgba(255,255,255,.85);
  line-height: 1.1;
  padding: .5rem;
}

.perso-addimage-plus{
  font-size: 44px;
  font-weight: 700;
  margin-bottom: .25rem;
}

.perso-addimage-text{
  font-size: 14px;
  opacity: .9;
}


.perso-up-canvaswrap{
  position: relative;
  display: inline-block;
}

/* Le canvas doit être un bloc (sinon offsets chelous) */
#persoUpCanvas{
  display: block;
  background: #fff;
}

/* Carré de sélection sur le canvas */
#persoUpSelection{
  position: absolute;
  display: none;                 /* JS le met à block */
  border: 2px dashed rgba(255,255,255,.65);
  background: rgba(13,110,253,.12); /* léger overlay */
  cursor: move;
  z-index: 20;
  box-sizing: border-box;
}

/* Poignée de resize */
#persoUpResizer{
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.35);
  cursor: nwse-resize;
  z-index: 21;
}

/* CTA overlay dans le carré (si tu utilises perso-addimage-placeholder) */
.perso-addimage-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  height:100%;
  width:100%;
  color: rgba(255,255,255,.85);
  border: 2px dashed rgba(255,255,255,.35);
  border-radius: .25rem;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 18px 18px;
  transition: .15s ease;
}
.perso-addimage-placeholder:hover{
  border-color: rgba(13,110,253,.9);
  background-color: rgba(13,110,253,.08);
}
.perso-plus{ font-size:44px; font-weight:700; line-height:1; }
.perso-plus-text{ font-size:14px; opacity:.9; margin-top:.25rem; }

.perso-chip{
    width: 92px;
    text-align: center;
    position: relative;
  }
  .perso-chip .avatar{
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.15);
    background: #f3f3f3;
    display:flex;
    align-items:center;
    justify-content:center;
    margin: 0 auto 6px auto;
  }
  .perso-chip .avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }
  .perso-chip .name{
    font-size: 12px;
    line-height: 1.1;
    word-break: break-word;
  }
  .perso-chip .remove{
    position:absolute;
    top:-8px;
    right:2px;
    border:none;
    width:22px;
    height:22px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    cursor:pointer;
  }
  .perso-chip.locked .remove{ display:none; }
  
  .btn-couleur{
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
  }

  .btn-couleur.active{
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,.55);
  }

/* ================
   TECH TREE (listing)
   ================ */

.tech-tree{
  position: relative;
  margin: 0;
  padding: 0;
}

/* Indentation uniquement pour les sous-niveaux */
.tech-tree:not(.level-0){
  margin-left: 3.2rem; /* décalage enfant (augmentable) */
}

/* Une branche = 1 item (carte) + éventuellement son sous-tree */
.tech-branch{
  --line-x: 16px;          /* position de la ligne verticale */
  --arm: 22px;             /* longueur du petit trait horizontal */
  --gap: 16px;             /* espace entre items */
  position: relative;
  margin-bottom: var(--gap);
  padding-left: calc(var(--line-x) + var(--arm) + 12px); /* place pour traits + marge */
}

/* Pas de marge en bas sur la dernière branche d’un niveau */
.tech-branch:last-child{ margin-bottom: 0; }

/* La carte (node) */
.tech-node{
  position: relative;
}

/* =========================
   TRAITS: uniquement enfants
   ========================= */

/* IMPORTANT: aucun trait au niveau racine */
.tech-tree.level-0 > .tech-branch{
  padding-left: 0;
}
.tech-tree.level-0 > .tech-branch::before{ display:none; content:none; }
.tech-tree.level-0 > .tech-branch .tech-node::before{ display:none; content:none; }

/* Trait vertical (sur la branche) : on le fait dépasser un peu dans l’espace (anti trous) */
.tech-tree:not(.level-0) > .tech-branch::before{
  content:"";
  position:absolute;
  left: var(--line-x);
  top: 0;
  bottom: calc(var(--gap) * -1); /* dépasse dans l’espace => continuité */
  width: 2px;
  background: #bfc3c7;
}

/* Dernier enfant du niveau : on coupe la verticale au CENTRE de la carte */
.tech-tree:not(.level-0) > .tech-branch.is-last::before{
  bottom: calc(50% + var(--gap) * -1);
}

/* Petit trait horizontal : on le met sur le node pour être au centre de la CARTE (pas du bloc) */
.tech-tree:not(.level-0) > .tech-branch > .tech-node::before{
  content:"";
  position:absolute;
  left: calc((var(--line-x) + var(--arm)) * -1);
  top: 50%;
  width: var(--arm);
  height: 2px;
  background: #bfc3c7;
  transform: translateY(-1px);
}

/* ==================================
   Petits réglages typographiques
   ================================== */

.card .badge{ font-size: 0.75rem; }
.tech-tags{ display:flex; gap:6px; flex-wrap:wrap; }
.tech-tags .badge{ font-size:0.80rem; }

/* Optionnel : compacter légèrement les cartes */
.tech-node .card .card-body{ padding: 0.90rem; }

/* petit espace interne autour des cartes */
.tech-node .card{
  margin-top: 6px;
  margin-bottom: 6px;
}.personnage-nameplate{
    background:#212529;          /* même couleur que bg-dark bootstrap */
    border:1px solid #6c757d;    /* même couleur que border-secondary */
    border-bottom:none;
    border-radius:10px 10px 0 0;
    margin-bottom:-1px;
    z-index:2;
    position:relative;
}

.personnage-top-block {
    background: #1f252b;
}