/* NightVenture - Start / save UI */

/* Etats UI officiels
   - nv-mode-menu : accueil
   - nv-mode-new-game : creation de personnage
   - nv-mode-playing : partie active
 */

body.nv-mode-menu #topCharacterBar,
body.nv-mode-new-game #topCharacterBar,
body.nv-mode-menu #navigationPrincipale,
body.nv-mode-new-game #navigationPrincipale,
body.nv-mode-menu #barreVuePrincipale,
body.nv-mode-new-game #barreVuePrincipale,
body.nv-mode-menu #infosMondeSidebar,
body.nv-mode-new-game #infosMondeSidebar,
body.nv-mode-menu #equipementSidebar,
body.nv-mode-new-game #equipementSidebar,
body.nv-mode-menu #journalSection,
body.nv-mode-new-game #journalSection,
body.nv-mode-menu #journalMini,
body.nv-mode-new-game #journalMini,
body.nv-mode-menu #journalNotifications,
body.nv-mode-new-game #journalNotifications {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.nv-mode-menu #gameLayout,
body.nv-mode-new-game #gameLayout {
    display: block !important;
}

body.nv-mode-menu #main,
body.nv-mode-new-game #main,
body.nv-mode-menu #vuePrincipale,
body.nv-mode-new-game #vuePrincipale {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.nv-mode-playing #topCharacterBar,
body.nv-mode-playing #navigationPrincipale {
    visibility: visible;
    pointer-events: auto;
}

.nv-start-actions .nv-start-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    color: var(--white, #fff);
    font-weight: bold;
    text-align: center;
    background: var(--gold-dark, #7c6236);
    border: 0;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.nv-start-actions .nv-start-label:hover {
    background: var(--gold-hover, #a8864b);
}

.nv-start-actions .nv-start-label:focus-within {
    outline: none;
    box-shadow: 0 0 8px var(--gold-bright, #ffd700);
}

.nv-start-actions .nv-start-label:active {
    transform: translateY(1px);
}

body.nv-mode-new-game .nv-classe-screen > .nv-start-hero {
    display: none !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.nv-classe-screen {
    padding-top: 12px !important;
}

.nv-newgame-name {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px !important;
    align-items: end !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    box-sizing: border-box !important;
}

.nv-newgame-name label {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
    color: var(--text-muted, #c7bdad) !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
}

.nv-newgame-name input {
    width: 100% !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 5px 8px !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    border: 1px solid rgba(245, 211, 122, 0.22) !important;
    background: rgba(0, 0, 0, 0.22) !important;
    color: var(--text, #f1eadf) !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    outline: none !important;
}

.nv-newgame-name input:focus {
    border-color: rgba(245, 211, 122, 0.48) !important;
    box-shadow: 0 0 0 2px rgba(245, 211, 122, 0.10) !important;
}

.nv-newgame-name button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 70px !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 5px 10px !important;
    border-radius: 10px !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.nv-class-select-bar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: clamp(3px, 1.35vw, 10px) !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 6px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.nv-class-select-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: clamp(32px, 8.2vw, 44px) !important;
    padding: clamp(5px, 1.6vw, 10px) clamp(3px, 1.8vw, 14px) !important;
    border-radius: 999px !important;
    font-size: clamp(0.52rem, 2.42vw, 0.92rem) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
    letter-spacing: -0.01em !important;
}

.nv-class-select-button.active {
    color: var(--white, #fff);
    background: var(--bg-selection, #5a4527);
    border: 1px solid var(--gold-bright, #ffd700);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.28);
}

.nv-newgame-start-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    margin: 0 0 12px !important;
    box-sizing: border-box !important;
}

.nv-newgame-start-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    color: var(--white, #fff) !important;
    background: linear-gradient(180deg, rgba(168, 134, 75, 0.95), rgba(113, 89, 49, 0.92)) !important;
    border: 1px solid rgba(245, 211, 122, 0.45) !important;
    box-shadow: 0 0 10px rgba(245, 211, 122, 0.18) !important;
    font-size: clamp(0.82rem, 3.2vw, 1rem) !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.nv-newgame-start-button:hover {
    filter: brightness(1.08);
}

.nv-selected-class-panel {
    margin-top: 0;
}

.nv-classe-card--selected {
    padding: 10px !important;
}

.nv-classe-card__header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    align-items: start;
    margin-bottom: 8px;
}

.nv-classe-card__header h3 {
    margin: 0 0 3px !important;
    font-size: 0.96rem !important;
    line-height: 1.1 !important;
}

.nv-classe-card__header p {
    margin: 0 !important;
    color: var(--text-muted, #c7bdad) !important;
    font-size: 0.78rem !important;
    line-height: 1.28 !important;
}

.nv-classe-card__header small,
.nv-class-start-skill {
    display: none !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.nv-class-stats-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.nv-class-stats-layout .fiche-personnage-section {
    padding: 6px !important;
    border-radius: 10px !important;
}

.nv-class-stats-layout .fiche-personnage-section h3 {
    font-size: 0.78rem !important;
    line-height: 1 !important;
    margin: 0 0 5px !important;
}

.nv-class-stats-layout .fiche-personnage-section:nth-child(2) h3 {
    font-size: 0 !important;
    line-height: 0 !important;
}

.nv-class-stats-layout .fiche-personnage-section:nth-child(2) h3::after {
    content: "Statistiques";
    display: block;
    font-size: 0.78rem !important;
    line-height: 1 !important;
}

.nv-class-stats-layout .liste-stats {
    gap: 4px !important;
}

.nv-class-stats-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.nv-class-stats-two-columns .ligne-stat {
    min-height: 22px !important;
    margin: 0 !important;
    padding: 3px 6px !important;
    border-radius: 8px !important;
    line-height: 1 !important;
}

.nv-class-stats-two-columns .ligne-stat span,
.nv-class-stats-two-columns .ligne-stat strong {
    font-size: 0.68rem !important;
    line-height: 1 !important;
}

@media (max-width: 900px) {
    .nv-class-select-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    .nv-class-select-button {
        min-height: 36px !important;
        padding-inline: 5px !important;
        font-size: clamp(0.54rem, 2.35vw, 0.78rem) !important;
    }

    .nv-classe-card__header,
    .nv-class-stats-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .nv-start-screen {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .nv-classe-screen {
        padding-top: 8px !important;
    }

    .nv-newgame-name {
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 5px !important;
        margin-bottom: 7px !important;
    }

    .nv-newgame-name label {
        font-size: 0.62rem !important;
    }

    .nv-newgame-name input {
        min-height: 28px !important;
        height: 28px !important;
        font-size: 0.74rem !important;
        padding: 4px 7px !important;
        border-radius: 9px !important;
    }

    .nv-newgame-name button {
        min-width: 58px !important;
        min-height: 28px !important;
        height: 28px !important;
        padding: 4px 7px !important;
        border-radius: 9px !important;
        font-size: 0.64rem !important;
    }

    .nv-class-select-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 4px !important;
    }

    .nv-class-select-button {
        min-height: 32px !important;
        padding: 5px 2px !important;
        font-size: clamp(0.48rem, 2.62vw, 0.68rem) !important;
        letter-spacing: -0.035em !important;
    }

    .nv-newgame-start-button {
        min-height: 38px !important;
        border-radius: 12px !important;
        font-size: clamp(0.78rem, 3.6vw, 0.9rem) !important;
    }

    .nv-class-stats-layout .fiche-personnage-section {
        padding: 5px !important;
    }

    .nv-class-stats-layout .fiche-personnage-section h3,
    .nv-class-stats-layout .fiche-personnage-section:nth-child(2) h3::after {
        font-size: 0.72rem !important;
    }

    .nv-class-stats-two-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3px !important;
    }

    .nv-class-stats-two-columns .ligne-stat {
        min-height: 20px !important;
        padding: 2px 5px !important;
    }

    .nv-class-stats-two-columns .ligne-stat span,
    .nv-class-stats-two-columns .ligne-stat strong {
        font-size: 0.62rem !important;
    }
}

@media (max-width: 360px) {
    .nv-start-screen {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .nv-newgame-name input {
        font-size: 0.70rem !important;
    }

    .nv-newgame-name button {
        min-width: 54px !important;
        font-size: 0.60rem !important;
        padding-inline: 5px !important;
    }

    .nv-class-select-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 3px !important;
    }

    .nv-class-select-button {
        min-height: 30px !important;
        padding-inline: 1px !important;
        font-size: 0.46rem !important;
        letter-spacing: -0.05em !important;
    }

    .nv-newgame-start-button {
        min-height: 36px !important;
        font-size: 0.78rem !important;
    }

    .nv-class-stats-two-columns .ligne-stat span,
    .nv-class-stats-two-columns .ligne-stat strong {
        font-size: 0.58rem !important;
    }
}
