* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #09090c;
    color: #e8e5e7;
}


/* =========================================
   HEADER
========================================= */

.header {
    width: 100%;
    height: 80px;

    display: grid;

    grid-template-columns:
        140px
        1fr
        260px;

    align-items: center;

    border-bottom: 1px solid #35101a;

    background:
        linear-gradient(
            180deg,
            rgba(8, 5, 6, 0.25),
            rgba(8, 5, 6, 0.35)
        ),
        url("banner.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.55);
}


/* =========================================
   LOGO
========================================= */

.logo-container {
    position: relative;

    width: 105px;
    height: 78px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.logo-container img {
    position: absolute;

    width: 90px;
    height: 90px;

    object-fit: contain;

    display: block;

    left: 7px;
    top: -5px;
}

.logo-static {
    z-index: 1;

    opacity: 0.85;

    filter:
        drop-shadow(
            0 0 3px rgba(255, 255, 255, 0.12)
        );

    transition:
        opacity 0.15s ease;
}

.logo-animated {
    z-index: 2;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.05s linear;
}

.logo-container.logo-active .logo-static {
    opacity: 0;
}

.logo-container.logo-active .logo-animated {
    opacity: 1;
}


/* =========================================
   DATE / HEURE
========================================= */

.date-time {
    width: 100%;

    padding-right: 25px;

    text-align: right;

    line-height: 1.4;

    justify-self: end;
}

#date {
    font-size: 14px;

    font-weight: bold;

    letter-spacing: 1px;

    color: #d9d5d8;
}

#clock {
    margin-top: 3px;

    font-size: 22px;

    font-weight: bold;

    letter-spacing: 2px;

    color: #e5003d;
}


/* =========================================
   DASHBOARD
========================================= */

.dashboard {
    width: 100%;

    height: calc(100vh - 80px);

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        500px;

    position: relative;

    background: #09090c;

    overflow: hidden;
}


/* =========================================
   ESPACE PERSONNAGES
========================================= */

.characters-workspace {
    min-width: 0;
    min-height: 0;

    display: flex;

    overflow: hidden;

    background: #09090c;
}


/* =========================================
   LISTE PERSONNAGES
========================================= */

.characters-list {
    min-width: 0;
    max-width: 100%;

    height: 100%;

    display: flex;

    flex: 0 1 auto;

    align-items: stretch;

    overflow-x: auto;
    overflow-y: hidden;

    background: #09090c;
}


/* =========================================
   PANNEAU PERSONNAGE
========================================= */

.characters-panel {
    width: 310px;
    min-width: 310px;
    max-width: 310px;

    height: 100%;

    padding: 18px;

    display: flex;
    flex-direction: column;

    flex-shrink: 0;

    border-right: 1px solid #35101a;

    background: #101014;

    overflow-y: hidden;
}


/* =========================================
   NOM PERSONNAGE
========================================= */

.character-name {
    width: 100%;

    min-height: 40px;

    padding: 9px 12px;

    margin-bottom: 12px;

    text-align: center;

    font-size: 16px;

    font-weight: bold;

    color: #eeeeee;

    background: #151519;

    border: 1px solid #e5003d;

    border-radius: 5px;

    box-shadow:
        inset 0 0 12px rgba(0, 0, 0, 0.35);

    outline: none;
}

.character-name.editing {
    background: #000000;

    border-color: #e5003d;

    color: #eeeeee;

    caret-color: #e5003d;

    box-shadow:
        inset 0 0 12px rgba(0, 0, 0, 0.75),
        0 0 6px rgba(229, 0, 61, 0.12);
}

.character-name.editing:focus {
    background: #000000;

    border-color: #e5003d;

    outline: none;
}


/* =========================================
   TÂCHES
========================================= */

.task-box {
    width: 100%;

    margin-bottom: 14px;

    padding: 14px;

    background: #101014;

    border: 1px solid #46121f;

    border-radius: 5px;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35);
}

.task-box h2 {
    margin: 0 0 13px 0;

    font-size: 15px;

    color: #dedadd;

    border-bottom: 1px solid #35101a;

    padding-bottom: 8px;
}

.task-box label {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 10px;

    font-size: 13px;

    color: #d0ccd0;

    cursor: pointer;
}

.task-box label:last-child {
    margin-bottom: 0;
}

.task-box input[type="checkbox"] {
    width: 15px;
    height: 15px;

    accent-color: #e5003d;

    cursor: pointer;
}

.task-box.weekly {
    margin-bottom: 15px;
}


/* =========================================
   ABYSSES
========================================= */

.abyss-button {
    width: 100%;

    padding: 13px 10px;

    margin-bottom: 15px;

    text-align: center;

    font-size: 14px;

    font-weight: bold;

    color: #dedadd;

    background: #151519;

    border: 1px solid #541322;

    border-radius: 5px;

    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.4);
}
.abyss-button {
    position: relative;
    height: 48px;
    box-sizing: border-box;
    padding: 7px 10px;
}

.abyss-timer-countdown {
    display: block;
    margin-top: 3px;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* =========================================
   BOUTON ÉDITION
========================================= */

.characters-panel {
    position: relative;
}

.edit-button {
    position: absolute;

    top: 25px;
    right: 25px;

    width: 24px;
    height: 24px;

    padding: 0;

    margin: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #e5003d;

    border-radius: 3px;

    background: #e5003d;

    color: #ffffff;

    font-size: 0;

    line-height: 1;

    cursor: pointer;

    z-index: 10;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.edit-button::before {
    content: "✎";

    font-size: 15px;

    font-weight: normal;

    color: #ffffff;

    line-height: 1;
}

.edit-button:hover {
    background: #ff174f;

    border-color: #ff174f;

    transform: scale(1.08);
}


/* =========================================
   SUPPRESSION PERSONNAGE
========================================= */

.delete-character-button {
    width: 100%;

    margin-top: 8px;

    padding: 11px;

    border: 1px solid #46121f;

    border-radius: 5px;

    background: #121216;

    color: #aaa5aa;

    font-size: 13px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.delete-character-button:hover {
    background: #19191e;

    border-color: #e5003d;

    color: #eeeeee;
}


/* =========================================
   AJOUT PERSONNAGE
========================================= */

.add-character {
    width: 120px;
    min-width: 120px;

    height: fit-content;

    display: flex;

    align-items: flex-start;

    justify-content: center;

    flex-shrink: 0;

    margin-top: 18px;

    padding: 0;

    border: none;
}

.add-character button {
    width: 92px;

    min-height: 75px;

    padding: 8px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 3px;

    border: 1px solid #46121f;

    border-radius: 5px;

    background: #101014;

    color: #c4bfc3;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.add-character button:hover {
    background: #18181d;

    border-color: #e5003d;

    color: #eeeeee;
}

.add-character strong {
    font-size: 24px;

    line-height: 1;

    color: #e5003d;
}

.add-character span {
    font-size: 11px;

    line-height: 1.2;

    text-align: center;
}


/* =========================================
   ZONE CENTRALE
========================================= */

.character-area {
    min-width: 0;
    min-height: 100%;

    flex: 1 1 auto;

    background: #09090c;
}


/* =========================================
   PANNEAU TIMERS
========================================= */

.timers-panel {
    width: 500px;
    min-width: 500px;
    max-width: 500px;

    height: 100%;

    padding: 18px;

    display: flex;

    flex-direction: column;

    border-left: 1px solid #35101a;

    border-top: 1px solid #35101a;

    border-bottom: 1px solid #35101a;

    background: #101014;

    overflow: hidden;
}


/* =========================================
   TITRE TIMERS
========================================= */

.panel-title {
    width: 100%;

    padding-bottom: 11px;

    margin-bottom: 15px;

    border-bottom: 1px solid #35101a;

    text-align: center;

    font-size: 15px;

    font-weight: bold;

    color: #dedadd;
}


/* =========================================
   TIMERS
========================================= */

.timer-card {
    width: 100%;

    height: 48px;

    padding: 0 10px;

    margin-bottom: 10px;

    display: flex;

    align-items: center;

    background: #151519;

    border: 1px solid #46121f;

    border-radius: 3px;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.35);

    overflow: hidden;

    position: relative;
}

.timer-card::before {
    content: "⚔";

    width: 32px;
    height: 32px;

    margin-right: 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 19px;

    color: #e5003d;

    background: #210b12;

    border: 1px solid #541322;

    border-radius: 2px;

    text-shadow:
        0 0 7px rgba(229, 0, 61, 0.45);
}

.timer-card h3 {
    margin: 0;

    order: 2;

    flex: 1;

    font-size: 12px;

    font-weight: bold;

    color: #dedadd;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.timer-card .timer {
    margin: 0 10px 0 0;

    order: 1;

    font-family: monospace;

    font-size: 16px;

    font-weight: bold;

    letter-spacing: 1px;

    color: #e5003d;

    white-space: nowrap;
}

.timer-card span {
    display: none;
}

.timer-card:hover {
    border-color: #e5003d;

    background: #19191e;
}


/* =========================================
   BLOC-NOTE
========================================= */

.notes {
    position: relative;
    margin-top: auto;

    padding-top: 15px;

    border-top: 1px solid #35101a;

    display: grid;

    grid-template-columns: auto auto 1fr;

    grid-template-rows: 38px auto;

    column-gap: 5px;

    align-items: center;
}

.notes h2 {
    grid-column: 3;
    grid-row: 1;

    margin: 0;

    text-align: left;

    font-size: 14px;

    color: #d5d1d4;

    white-space: nowrap;
}



/* =========================================
   BARRE D'OUTILS
========================================= */

.notes-toolbar {
    grid-column: 1 / 3;
    grid-row: 1;

    width: auto;

    height: 38px;

    margin-bottom: 0;

    display: flex;

    align-items: center;

    gap: 5px;
}

.notes-tool {
    width: 32px;
    height: 32px;

    padding: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #46121f;

    border-radius: 4px;

    background: #121216;

    color: #d9d5d8;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 14px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.notes-tool:hover {
    background: #19191e;

    border-color: #e5003d;

    color: #ffffff;
}

.notes-tool.notes-bold.active {
    border-color: #e5003d;

    color: #ffffff;

    box-shadow:
        0 0 0 1px rgba(229, 0, 61, 0.15);
}

.notes-tool strong {
    font-size: 15px;
}


/* =========================================
   PALETTE
========================================= */

.notes-color-wrapper {
    position: relative;
}

.notes-color-palette {
    position: absolute;

    left: 0;
    bottom: 37px;

    width: 235px;

    padding: 10px;

    display: none;

    z-index: 100;

    background: #101014;

    border: 1px solid #46121f;

    border-radius: 5px;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.65);
}

.notes-color-palette.open {
    display: block;
}

.notes-color-grid {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 5px;
}

.notes-color-grid button {
    width: 25px;
    height: 25px;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.18);

    border-radius: 3px;

    cursor: pointer;

    box-shadow:
        inset 0 0 2px rgba(255, 255, 255, 0.25);

    transition:
        transform 0.1s ease,
        border-color 0.1s ease;
}

.notes-color-grid button:hover {
    transform: scale(1.12);

    border-color: #ffffff;

    position: relative;

    z-index: 2;
}

.notes-custom-color {
    margin-top: 10px;

    padding-top: 9px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-top: 1px solid #35101a;

    color: #aaa5aa;

    font-size: 11px;

    cursor: pointer;
}

.notes-custom-color-input {
    width: 35px;
    height: 25px;

    padding: 0;

    border: 1px solid #46121f;

    border-radius: 3px;

    background: transparent;

    cursor: pointer;
}


/* =========================================
   ÉDITEUR
========================================= */

.notes-editor {
    width: 100%;

    height: 125px;

    padding: 10px;

    overflow-y: auto;

    outline: none;

    border: 1px solid #46121f;

    border-radius: 5px;

    background: #0d0d11;

    color: #dddddd;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 12px;

    line-height: 1.45;

    white-space: pre-wrap;

    word-break: break-word;
}

.notes-editor:focus {
    border-color: #e5003d;

    box-shadow:
        0 0 8px rgba(229, 0, 61, 0.18);
}

.notes-editor:empty::before {
    content: attr(data-placeholder);

    color: #5f5a60;

    pointer-events: none;
}

.notes-editor::selection {
    background: rgba(229, 0, 61, 0.35);
}
.notes-editor {
    grid-column: 1 / 4;
    grid-row: 2;
}

/* =========================================
   LIENS UTILES
========================================= */

.timers-panel > .useful-links {
    margin-top: auto;

    margin-bottom: 0;
}

.useful-links {
    width: 100%;

    padding: 12px;

    margin-bottom: 15px;

    background: #101014;

    border: 1px solid #46121f;

    border-radius: 5px;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.30);
}

.useful-links h2 {
    margin: 0 0 10px 0;

    padding-bottom: 8px;

    border-bottom: 1px solid #35101a;

    text-align: center;

    font-size: 14px;

    color: #dedadd;
}

.useful-links p {
    margin: 7px 0;

    font-size: 11px;

    line-height: 1.5;

    color: #aaa5aa;
}

.useful-links p:last-child {
    margin-bottom: 0;
}

.useful-links a {
    color: #e5003d;

    font-weight: bold;

    text-decoration: none;

    transition:
        color 0.2s ease,
        text-shadow 0.2s ease;
}

.useful-links a:hover {
    color: #ff315f;

    text-decoration: underline;

    text-shadow:
        0 0 6px rgba(229, 0, 61, 0.35);
}


/* =========================================
   CRÉDIT
========================================= */

.credit {
    width: 100%;

    margin-top: 8px;

    text-align: center;

    font-size: 10px;

    line-height: 1.4;

    color: #777277;
}

.credit span {
    color: #e5003d;

    font-weight: bold;
}

.timers-panel > .credit {
    width: 100%;

    margin-top: 8px;

    text-align: center;
}


/* =========================================
   5 PERSONNAGES
========================================= */

.dashboard.max-characters .character-area {
    display: none;
}

.dashboard.max-characters .characters-workspace {
    min-width: 0;

    width: 100%;
}

.dashboard.max-characters .characters-list {
    width: 100%;

    max-width: 100%;

    overflow-x: hidden;
}


/* =========================================
   SCROLLBARS
========================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: #09090c;
}

::-webkit-scrollbar-thumb {
    background: #35101a;

    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #541322;
}
/* =========================================
   TÂCHES REPLIABLES
========================================= */

.task-box h2 {
    cursor: pointer;

    user-select: none;

    transition:
        color 0.15s ease;
}

.task-box h2:hover {
    color: #ffffff;
}

.task-box.collapsed {
    padding-bottom: 10px;
}

.task-box.collapsed label {
    display: none;
}

.task-box.collapsed h2 {
    margin-bottom: 0;
}
/* =========================================
   SCROLL INDIVIDUEL DES LISTES DE TÂCHES
========================================= */

.task-list {
    max-height: 210px;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 5px;
}
/* =========================================
   ÉDITION DES TÂCHES
========================================= */

.task-box {
    position: relative;
}

.task-add-button {
    position: absolute;

    top: 10px;
    right: 10px;

    width: 25px;
    height: 25px;

    padding: 0;

    display: none;

    align-items: center;
    justify-content: center;

    border: 1px solid #e5003d;
    border-radius: 4px;

    background: #121216;
    color: #e5003d;

    font-size: 18px;
    font-weight: bold;

    line-height: 1;

    cursor: pointer;
}

.task-box.editing .task-add-button {
    display: flex;
}

.task-add-button:hover {
    background: #e5003d;
    color: #ffffff;
}

.task-edit-name {
    flex: 1;

    min-width: 0;

    padding: 4px 6px;

    border: 1px solid #46121f;
    border-radius: 3px;

    background: #000000;
    color: #eeeeee;

    font-family: inherit;
    font-size: 13px;

    outline: none;
}

.task-edit-name:focus {
    border-color: #e5003d;
}

.task-delete-button {
    flex: 0 0 22px;

    width: 22px;
    height: 22px;

    padding: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #46121f;
    border-radius: 3px;

    background: #121216;
    color: #e5003d;

    font-size: 13px;

    line-height: 1;

    cursor: pointer;
}

.task-delete-button:hover {
    background: #e5003d;
    color: #ffffff;
}

.task-box.editing label {
    gap: 7px;
}

.task-box.editing label .task-delete-button {
    display: flex;
}

.task-box:not(.editing) label .task-delete-button {
    display: none;
}
/* =========================================
   COULOIRS EN ABYSSES - ACTIVATION
========================================= */

.abyss-button {
    cursor: pointer;
    background: #000000;
}

.abyss-button.active {
    background: #e5003d;
    border-color: #e5003d;
    color: #ffffff;
}/* =========================================
   AION 2 - TIMERS JOURNALIERS
========================================= */

.aion-timers-root {
    width: 100%;
}

.aion-timer-date {
    width: 100%;
    margin-bottom: 15px;
    padding-bottom: 10px;

    text-align: center;

    font-size: 15px;
    font-weight: bold;

    color: #e5003d;

    border-bottom: 1px solid #35101a;

    text-transform: capitalize;
}


/* =========================================
   CATÉGORIES
========================================= */

.aion-timer-section {
    width: 100%;
    margin-bottom: 18px;
}

.aion-timer-section h3 {
    margin: 0 0 8px 0;
    padding-bottom: 6px;

    font-size: 11px;
    font-weight: bold;

    color: #dedadd;

    border-bottom: 1px solid #35101a;

    letter-spacing: 0.8px;
}


/* =========================================
   AION 2 - TIMERS
========================================= */

.aion-timer-name {
    color: #e5003d;
    font-weight: bold;
}

.aion-timer-time {
    color: #e5003d;
    font-weight: bold;
}

.aion-timer-countdown {
    color: #e5003d;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

.aion-timer-date {
    color: #dedadd;
    text-align: center;
    margin-bottom: 12px;
    font-size: 12px;
}

.aion-timer-section {
    margin-bottom: 14px;
}

.aion-timer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 5px 7px;
    margin-bottom: 4px;

    background: #151519;
    border: 1px solid #35101a;
    border-radius: 3px;
}

.aion-timer-row:hover {
    border-color: #e5003d;
}

.aion-timer-info {
    flex: 1;
    min-width: 0;
}

.aion-timer-name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aion-timer-time {
    font-size: 11px;
    margin-top: 2px;
}

.aion-timer-countdown {
    flex-shrink: 0;
    font-size: 13px;
}


/* =========================================
   NOM + HEURE
========================================= */

.aion-timer-info {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}

.aion-timer-name {
    min-width: 0;

    font-size: 11px;
    font-weight: bold;

    color: #e5003d;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aion-timer-time {
    font-size: 10px;

    color: #857175;
}


/* =========================================
   COMPTE À REBOURS
========================================= */

.aion-timer-countdown {
    flex-shrink: 0;

    margin-left: 10px;

    font-family: monospace;
    font-size: 13px;
    font-weight: bold;

    color: #e5003d;

    white-space: nowrap;
}

.aion-timer-row.done {
    opacity: 0.42;
}

.aion-timer-row.done .aion-timer-countdown {
    color: #6d6265;
}


/* =========================================
   AUCUN ÉVÉNEMENT
========================================= */

.aion-timer-empty {
    padding: 8px;

    text-align: center;

    font-size: 10px;

    color: #6d6265;
}
/* =========================================
   CATÉGORIES DES TIMERS - MENU DÉROULANT
========================================= */

.aion-timer-section {
    margin-bottom: 12px;
}

.aion-timer-section h3 {
    width: 100%;
    min-height: 38px;
    margin: 0 0 8px 0;
    padding: 9px 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;

    background: #151519;
    border: 1px solid #e5003d;
    border-radius: 4px;

    color: #e5003d;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.aion-timer-section h3::after {
    content: "▼";

    margin-left: 10px;

    font-size: 9px;
    color: #e5003d;

    transition:
        transform 0.15s ease;
}

.aion-timer-section h3:hover {
    background: #210b12;
    border-color: #ff174f;
}

.aion-timer-section.collapsed h3 {
    margin-bottom: 0;
}

.aion-timer-section.collapsed h3::after {
    transform: rotate(-90deg);
}

.aion-timer-section.collapsed .aion-timer-row {
    display: none;
}
/* =========================================
   ZONE DES TIMERS — CADRE FIXE
========================================= */

.aion-timers-root {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    box-sizing: border-box;
}
/* Taille des textes des timers */

.aion-timer-name {
    font-size: 14px;
}

.aion-timer-time {
    font-size: 12px;
}

.aion-timer-countdown {
    font-size: 15px;
}
/* =========================================
   SUPPRESSION PERSONNAGE — MODE ÉDITION
========================================= */

.characters-panel {
    position: relative;
}

.delete-character-button {
    position: absolute;

    top: 1px;
    right: 10px;

    width: 32px;
    height: 32px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e5003d;
    border-radius: 4px;

    background: #e5003d;
    color: #ffffff;

    font-size: 22px;
    font-weight: bold;
    line-height: 1;

    cursor: pointer;
    z-index: 10;
}

.delete-character-button:hover {
    background: #ff174f;
    border-color: #ff174f;
}

.delete-character-button:hover {
    background: #ff174f;
    border-color: #ff174f;
}