/* ============================================================
   Module Roleplay + Assistance : personnage, groupe, fiches,
   modpack, mon role, tickets (joueur et staff), roles RP (staff).
   ============================================================ */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pleine-ligne { grid-column: 1 / -1; flex-basis: 100%; }
.ligne-serree { gap: 6px; flex-wrap: nowrap; }
.zone-sensible { border-color: rgba(210, 85, 85, 0.35); }
.section-titre { margin-top: 28px; }
.fiche-depliable { margin-top: 10px; }
.fiche-depliable > summary { cursor: pointer; color: var(--bleu-clair); font-weight: 600; font-size: 0.9em; }
.fiche-depliable[open] > summary { margin-bottom: 8px; }
.raison-indispo { color: var(--orange); }
.code-inline { font-family: monospace; letter-spacing: 1px; }
.champ-court { max-width: 220px; }
fieldset.sans-cadre { border: 0; padding: 0; margin: 0; min-width: 0; }
.bouton.bouton-desactive { opacity: 0.5; cursor: not-allowed; }

/* ------------------------------------------------------------
   Personnage
   ------------------------------------------------------------ */
.personnage-layout { grid-template-columns: minmax(0, 1fr) 280px; }
@media (max-width: 760px) { .personnage-layout { grid-template-columns: 1fr; } }
.personnage-layout .carte { margin-bottom: 0; }
.colonne-skin canvas { max-width: 100%; }
.personnage-layout > .pile { gap: 18px; }
.personnage-layout .barre-actions-collante { margin-top: 0; }
.personnage-layout .barre-actions-collante .erreur-champ { margin: 0; }
.colonne-skin h2 { text-align: left; }
.colonne-skin canvas { display: block; margin: 0 auto; }
.colonne-skin canvas.apercu-2d { width: 128px; height: 128px; image-rendering: pixelated; padding: 16px; }
.colonne-skin .aide { font-size: 0.8em; color: var(--texte-attenue); }
.bouton-fichier { position: relative; margin-top: 10px; }
.bouton-fichier:focus-within { box-shadow: 0 0 0 3px rgba(63, 169, 224, 0.35); }

.choix-groupe { border: 0; padding: 0; margin-bottom: 6px; }
.choix-motif > span { display: block; }
.choix-motif .icone { margin-right: 4px; color: var(--bleu); }
.champ-code { max-width: 180px; font-family: monospace; font-size: 1.2em !important; letter-spacing: 3px; text-transform: uppercase; }
.verif-code { font-size: 0.88em; margin: 6px 0 0; min-height: 1.2em; }

.resume-groupe { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--fond-carte-clair); border: 1px solid var(--bordure); border-radius: var(--rayon-md); padding: 12px 14px; margin-bottom: 8px; }

.liste-points { display: flex; flex-direction: column; gap: 8px; }
.ligne-point { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--fond-carte-clair); border: 1px solid var(--bordure); border-radius: var(--rayon-md); }
.ligne-point > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.compteur-points button { width: 34px; height: 34px; padding: 0; font-size: 1.15em; }

/* ------------------------------------------------------------
   Groupe et fiches
   ------------------------------------------------------------ */
.carte-invitation { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: var(--bleu-fonce); }
.carte-membre { margin-bottom: 0; }
.carte-moi { border-color: var(--bleu-fonce); }
.carte-survivant-texte { min-width: 0; }
.carte-survivant-texte h3, .carte-survivant-texte h2 { margin: 0 0 2px; font-size: 1.08em; color: var(--texte); overflow-wrap: anywhere; }
.carte-survivant-texte .badge { margin-top: 4px; }
canvas.tete-skin { image-rendering: pixelated; background: var(--fond-carte-clair); }
.carte-place-libre { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--texte-faible); border-style: dashed; box-shadow: none; min-height: 120px; margin-bottom: 0; }

.chat-groupe .zone-chat { height: 420px; }
.chat-plus { align-self: center; flex-shrink: 0; }
.chat-jour { align-self: center; font-size: 0.72em; color: var(--texte-faible); text-transform: uppercase; letter-spacing: 0.5px; margin: 6px 0 2px; }
@media (max-width: 560px) { .chat-groupe .zone-chat { height: 60vh; } .bulle-chat { max-width: 90%; } .chat-saisie button span { display: none; } }

.grille-fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.carte-fiche { margin-bottom: 0; display: flex; flex-direction: column; gap: 6px; }
.carte-fiche[hidden] { display: none; }
.fiche-extrait { color: var(--texte-attenue); font-size: 0.92em; }
.fiche-texte { font-size: 0.92em; }
@media (max-width: 420px) { .grille-fiches { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   Modpack
   ------------------------------------------------------------ */
.carte-modpack { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.modpack-fichier { display: flex; align-items: center; gap: 14px; min-width: 0; }
.modpack-fichier h2 { overflow-wrap: anywhere; font-size: 1.15em; }
.modpack-icone { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--rayon-md); background: rgba(63, 169, 224, 0.12); color: var(--bleu); flex-shrink: 0; }
.modpack-icone .icone { width: 26px; height: 26px; }
.guide-etapes { list-style: none; counter-reset: guide; padding: 0; margin: 0 0 20px; }
.guide-etapes > li { counter-increment: guide; position: relative; padding: 0 0 18px 50px; }
.guide-etapes > li::before {
    content: counter(guide); position: absolute; left: 0; top: 0;
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--fond-carte-clair); border: 2px solid var(--bleu-fonce); color: var(--bleu-clair); font-weight: 700;
}
.guide-etapes > li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--bordure); }
.guide-etapes h3 { margin: 4px 0 6px; }
.guide-etapes p { color: var(--texte-attenue); margin: 0 0 8px; }
.guide-etapes .carte { margin-bottom: 0; }
@media (max-width: 700px) { .guide-etapes .grille-2 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   Mon role
   ------------------------------------------------------------ */
.carte-mon-role { border-color: var(--bleu-fonce); }
.carte-mon-role h2 { margin-top: 4px; }
.carte-mon-role .fiche-infos { margin: 14px 0; }
.lore-role { margin-bottom: 12px; }
.carte-proposition { border-color: var(--jaune); }
.liste-accords { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.carte-interet form { margin: 0; }
.select-court { width: auto; }
.grille-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.carte-role { margin-bottom: 0; display: flex; flex-direction: column; }
.carte-role p { margin: 8px 0; }
.carte-role > :last-child { margin-top: auto; }
.carte-role-indispo { opacity: 0.7; }

/* ------------------------------------------------------------
   Assistance (joueur)
   ------------------------------------------------------------ */
.liste-tickets { display: flex; flex-direction: column; gap: 10px; }
.carte-ticket { display: flex; align-items: center; gap: 14px; margin-bottom: 0; padding: 14px 16px; color: var(--texte); transition: border-color var(--transition); }
.carte-ticket:hover { border-color: var(--bleu-fonce); text-decoration: none; color: var(--texte); }
.carte-ticket-ferme { opacity: 0.75; }
.carte-ticket-icone { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--fond-carte-clair); color: var(--bleu); flex-shrink: 0; }
.carte-ticket-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.carte-ticket-fleche { color: var(--texte-faible); }

.numero-etape { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bleu-fonce); color: #fff; font-size: 0.75em; margin-right: 6px; vertical-align: 2px; }
#form-ticket .carte { margin-bottom: 16px; }
.choix-motifs { border: 0; padding: 0; }
.conteneur-personnes .ligne-personne input { max-width: 260px; }
.conteneur-personnes .ligne-personne input[readonly] { opacity: 0.85; }

.reponses-ticket { margin: 0; }
.reponses-ticket dt { color: var(--texte-attenue); font-size: 0.88em; font-weight: 600; margin-top: 14px; }
.reponses-ticket dt:first-child { margin-top: 0; }
.reponses-ticket dd { margin: 6px 0 0; overflow-wrap: anywhere; }
.puce-personne { display: inline-flex; align-items: center; gap: 6px; background: var(--fond-carte-clair); border: 1px solid var(--bordure); border-radius: var(--rayon-pill); padding: 3px 10px 3px 4px; margin: 0 4px 4px 0; font-size: 0.9em; }

/* ------------------------------------------------------------
   Staff : roles RP
   ------------------------------------------------------------ */
.grille-roles-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .grille-roles-staff { grid-template-columns: 1fr; } }
.carte-role-staff { margin-bottom: 0; }
.carte-role-staff .carte-entete { align-items: flex-start; }
.carte-surlignee { border-color: var(--dore); box-shadow: 0 0 0 2px rgba(244, 196, 48, 0.35); }
.places-role { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.places-role .barre-progression { flex: 1; }
.occupants-titre { font-size: 0.85em; color: var(--texte-attenue); text-transform: uppercase; letter-spacing: 0.5px; margin: 16px 0 8px; }
.liste-occupants { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.liste-occupants li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; background: var(--fond-carte-clair); border-radius: var(--rayon-md); }
.liste-occupants li > span { flex: 1; min-width: 140px; }
.form-attribution { display: flex; gap: 8px; margin-top: 8px; }
.form-attribution select { flex: 1; min-width: 0; }
.choix-etoiles { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.choix-etoiles label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.etoiles-choix { color: var(--dore); letter-spacing: 1px; }
@media (max-width: 560px) { .form-attribution { flex-direction: column; } }
.carte .bouton-bloc + .fiche-infos, .carte p + .fiche-infos { margin-top: 14px; }
