/* ========================================================================== */
/*  GOETIA — FEUILLE DE STYLE PRINCIPALE                                      */
/*                                                                            */
/*  Organisation du fichier :                                                 */
/*  01. Polices                                                               */
/*  02. Variables                                                             */
/*  03. Base générale                                                         */
/*  04. Structure commune                                                     */
/*  05. Header                                                                */
/*  06. Footer                                                                */
/*  07. Page d'accueil                                                        */
/*  08. Page Stockage                                                         */
/*  09. Page Docker                                                           */
/*  10. Page Minecraft                                                        */
/*  11. Page Réseau détaillé                                                  */
/*  12. Page Paramètres                                                       */
/*  13. Responsive                                                            */
/*  14. Ajustements de lisibilité et graphiques                               */
/*  15. Ajustements finaux Minecraft                                          */
/*  16. Pavé PIN commun                                                       */
/* ========================================================================== */

/* 01 - POLICES */

/* Police utilisée pour le nom GOETIA dans le header. */
@font-face {
    font-family: "Dela Gothic One";
    src: url("../assets/fonts/DelaGothicOne-Regular.ttf");
}

/* Police principale du site — graisse normale. */
@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/Inter_24pt-Regular.ttf");
    font-weight: 400;
}

/* Police principale du site — graisse semi-grasse. */
@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/Inter_24pt-SemiBold.ttf");
    font-weight: 600;
}

/* Police principale du site — graisse grasse. */
@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/Inter_24pt-Bold.ttf");
    font-weight: 700;
}

/* 02 - VARIABLES */

:root {
    /* Fonds */
    --background: #0a0a0a;
    --card: #0c0d0f;

    /* Séparations et bordures */
    --border: #2b2b2b;

    /* Couleur principale */
    --purple: #6a25cc;

    /* Textes */
    --white: #ffffff;
    --gray: #b8b8b8;

    /* États */
    --green: #2ecc71;
    --red: #e74c3c;
    --orange: #f39c12;

    /* Police principale */
    --font: "Inter", "Segoe UI", Arial, sans-serif;
}

/* 03 - BASE GÉNÉRALE */

/* Le padding et les bordures restent compris dans la taille des éléments. */
* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;

    display: flex;
    flex-direction: column;

    background: var(--background);
    color: var(--white);
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.25;

    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 04 - STRUCTURE COMMUNE */

/* Zone située entre le header et le footer. */
.main {
    flex: 1;

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

    padding: 20px;

    touch-action: pan-y;
}

/* Largeur commune des pages qui ne sont pas des grilles de cartes. */
.page {
    width: 100%;
    max-width: 900px;
}

/* Section générique utilisée notamment sur la page Stockage. */
.section {
    padding: 18px 0;
}

/* Titre centré avec une ligne de chaque côté. */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;

    margin: 24px 0;

    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

.section-title::before,
.section-title::after {
    content: "";

    flex: 1;
    height: 1px;

    background: var(--border);
}

/* 05 - HEADER */

.header {
    position: relative;

    height: 125px;
    padding: 24px 24px 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    border-bottom: 1px solid var(--border);
}

/* Ligne principale : logo à gauche, statut à droite. */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo et nom GOETIA. */
.header-left {
    display: flex;
    align-items: center;
    gap: 1px;
}

.logo {
    width: 100px;
    height: auto;

    display: block;
    transform: translateY(15px);
}

.brand-name {
    color: var(--white);
    font-family: "Dela Gothic One";
    font-size: 40px;
    letter-spacing: 0;
}

/* Date et heure centrées dans la partie basse du header. */
.header-center {
    position: absolute;
    top: 105px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    gap: 20px;

    color: var(--gray);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
}

.separator {
    color: var(--border);
}

/* Statut du serveur et cadenas. */
.header-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--green);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
}

.status-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;
    background: var(--green);
}

.lock-icon {
    width: 18px;
    height: 18px;
    display: block;

    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
}

.lock-icon:active {
    transform: scale(0.9);
}

/* 06 - FOOTER */

.footer {
    height: 55px;
    padding: 0 24px;

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

    border-top: 1px solid var(--border);

    color: var(--gray);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 400;
}

/* Adresse IP et nom de domaine, à gauche. */
.footer-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-separator {
    color: var(--border);
}

/* Points de navigation, à droite. */
.page-indicator {
    display: flex;
    align-items: center;
    gap: 2px;
}

.page-dot {
    width: 6px;
    height: 6px;
    padding: 9px;

    box-sizing: content-box;
    background: var(--gray);
    background-clip: content-box;

    border-radius: 50%;
    opacity: 0.7;

    pointer-events: auto;
    cursor: pointer;
    flex-shrink: 0;

    transition:
        opacity 150ms ease,
        transform 150ms ease;
}

.page-dot:hover {
    opacity: 1;
}

.page-dot.active,
body[data-page="dashboard"] .page-dot[data-page="dashboard"],
body[data-page="stockage"] .page-dot[data-page="stockage"],
body[data-page="docker"] .page-dot[data-page="docker"],
body[data-page="minecraft"] .page-dot[data-page="minecraft"],
body[data-page="reseau"] .page-dot[data-page="reseau"],
body[data-page="parametres"] .page-dot[data-page="parametres"] {
    width: 9px;
    height: 9px;

    background-color: var(--purple);
    background-clip: content-box;

    opacity: 1;
}

/* 07 - PAGE D'ACCUEIL */

/* -------------------------------------------------------------------------- */
/*  07.1 — Grille et formats de cartes                                        */
/* -------------------------------------------------------------------------- */

/* Grille de six colonnes servant à placer toutes les cartes. */
.dashboard-grid {
    width: 100%;
    max-width: 900px;

    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

/* Style commun à toutes les cartes de l'accueil. */
.card {
    min-width: 0;

    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);

    color: var(--white);
    font-family: var(--font);
}

/* Grande carte : CPU, RAM et température. */
.card-normal {
    grid-column: span 2;

    height: 250px;
    padding: 16px;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

/* Demi-largeur : IP, sauvegarde et alertes. */
.card-half {
    grid-column: span 3;

    height: 115px;
    padding: 16px;

    display: flex;
    flex-direction: column;
}

/* Pleine largeur : Docker et débit. */
.card-line {
    grid-column: span 6;

    height: 80px;
    padding: 16px;

    display: flex;
    flex-direction: column;
}

/* Partie haute d'une grande carte. */
.card-header {
    display: flex;
    justify-content: center;
}

.card-title {
    font-size: 13px;
    font-weight: 700;
}

/* Partie centrale d'une grande carte. */
.card-body {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.card-value {
    font-size: 36px;
    font-weight: 700;
}

/* Zone réservée au mini-graphique du bas. */
.card-footer {
    height: 35px;
}

/* -------------------------------------------------------------------------- */
/*  07.2 — Cercles de progression CPU et RAM                                  */
/* -------------------------------------------------------------------------- */

.progress-ring {
    position: relative;

    width: clamp(120px, 9vw, 130px);
    height: clamp(120px, 9vw, 130px);
}

.progress-ring svg {
    width: 100%;
    height: 100%;

    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.ring-value {
    fill: none;
    stroke: var(--purple);
    stroke-width: 8;
    stroke-linecap: round;

    stroke-dasharray: 314;
    stroke-dashoffset: calc(314 - (314 * var(--value)) / 100);
}

/* Pourcentage placé au centre du cercle. */
.progress-ring .card-value {
    position: absolute;
    inset: 0;

    margin: 0;

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

    font-size: 30px;
    font-weight: 700;
}

/* Valeur secondaire, par exemple 7.4 / 16 Go. */
.card-subtitle {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;

    color: var(--gray);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* -------------------------------------------------------------------------- */
/*  07.3 — Mini-graphiques CPU, RAM et température                            */
/* -------------------------------------------------------------------------- */

.mini-graph {
    width: 100%;
    height: 25px;
}

.mini-graph polyline {
    fill: none;
    stroke: var(--purple);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* -------------------------------------------------------------------------- */
/*  07.4 — Carte Température                                                   */
/* -------------------------------------------------------------------------- */

.temperature-body {
    justify-content: center;
}

.temperature-row {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.temperature-gauge {
    position: relative;

    width: 62px;
    height: 135px;
}

.temperature-icon {
    position: relative;
    z-index: 2;

    width: 100%;
    height: 100%;

    display: block;
}

/* Remplissage violet situé derrière l'icône du thermomètre. */
.temperature-fill {
    position: absolute;
    z-index: 1;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);

    width: 10px;
    height: calc(var(--temp) * 1.15px);
    max-height: 95px;

    border-radius: 16px 16px 24px 24px;
    background: var(--purple);
}

.temperature-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.temperature-value {
    color: var(--white);
    font-size: 34px;
    font-weight: 700;
}

.temperature-label {
    margin-top: 6px;

    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/*  07.5 — Carte Docker                                                        */
/* -------------------------------------------------------------------------- */

.docker-card {
    grid-column: 1 / -1;

    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.docker-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.docker-icon {
    width: 52px;
    height: 52px;
}

.docker-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.docker-title {
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
}

.docker-count {
    color: var(--purple);
    font-size: 13px;
    font-weight: 700;
}

.docker-status-dots {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Rouge par défaut : service arrêté. */
.service-dot {
    width: 12px;
    height: 12px;

    border-radius: 50%;
    background: var(--red);
}

/* Vert : service actif. */
.service-dot.active {
    background: var(--green);
}

/* -------------------------------------------------------------------------- */
/*  07.6 — Cartes IP, sauvegarde et alertes                                   */
/* -------------------------------------------------------------------------- */

.ip-card {
    height: 100%;
    padding: 0 12px;

    display: flex;
    align-items: center;
    gap: 18px;
}

.ip-icon {
    width: 42px;
    height: 42px;
}

.ip-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ip-title {
    color: var(--gray);
    font-size: 12px;
    font-weight: 600;
}

.ip-value {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
}

/* Valeur verte utilisée pour la sauvegarde et l'absence d'alerte. */
.save-value {
    color: var(--green);
    font-size: 18px;
    font-weight: 700;
}

.status-icon {
    width: 28px;
    height: 28px;
    margin-left: auto;
}

/* -------------------------------------------------------------------------- */
/*  07.7 — Carte Débit                                                         */
/* -------------------------------------------------------------------------- */

.speed-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.speed-title {
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

.speed-values {
    display: flex;
    align-items: center;
    gap: 18px;
}

.speed-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.speed-icon {
    width: 18px;
    height: 18px;
}

.speed-number {
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
}

.speed-unit {
    color: var(--gray);
    font-size: 12px;
}

.speed-separator {
    width: 1px;
    height: 28px;

    background: var(--border);
}

.speed-graph {
    width: 120px;
    height: 30px;
}

.speed-graph polyline {
    fill: none;
    stroke: var(--purple);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 08 - PAGE STOCKAGE */

/* -------------------------------------------------------------------------- */
/*  08.1 — Résumé des HDD principaux                                          */
/* -------------------------------------------------------------------------- */

.storage-summary-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Ligne Utilisation + capacité totale utilisée. */
.storage-summary-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.storage-label {
    color: var(--gray);
    font-size: 13px;
    font-weight: 600;
}

.storage-value {
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
}

/* Ligne Libre + État. */
.storage-summary-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.storage-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.storage-info:last-child {
    justify-content: flex-end;
}

/* Texte d'état affiché dans le résumé. */
.storage-state {
    font-size: 16px;
    font-weight: 700;
}

.storage-state.healthy {
    color: var(--green);
}

.storage-state.warning {
    color: var(--red);
}

/* -------------------------------------------------------------------------- */
/*  08.2 — Barres de stockage communes                                        */
/* -------------------------------------------------------------------------- */

.storage-bar {
    height: 8px;
    margin: 10px 0 12px;

    overflow: hidden;

    border-radius: 999px;
    background: var(--border);
}

.storage-bar-fill {
    height: 100%;

    border-radius: 999px;
    background: var(--purple);
}

/* Barre rouge utilisée en cas d'avertissement. */
.storage-bar-fill.warning {
    background: var(--red);
}

/* -------------------------------------------------------------------------- */
/*  08.3 — NVMe système                                                       */
/* -------------------------------------------------------------------------- */

/* Le NVMe reste dans le résumé et n'entre pas dans le total des HDD. */
.system-drive {
    margin-top: 14px;
    padding-top: 12px;

    display: flex;
    flex-direction: column;
    gap: 6px;

    border-top: 1px solid var(--border);
}

.system-drive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.system-drive .storage-bar {
    height: 7px;
}

/* -------------------------------------------------------------------------- */
/*  08.4 — Deux colonnes : principaux et sauvegardes                          */
/* -------------------------------------------------------------------------- */

.storage-columns {
    width: 100%;
    margin-top: 14px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Colonne de gauche : HDD principaux. */
.storage-column {
    min-width: 0;
    padding-right: 18px;
}

/* Colonne de droite : HDD de sauvegarde. */
.storage-column-backup {
    padding-right: 0;
    padding-left: 18px;

    border-left: 1px solid var(--border);
}

/* Titres plus petits uniquement dans la double colonne. */
.storage-columns .section-title {
    margin: 10px 0 16px;

    font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/*  08.5 — Une ligne de disque                                                 */
/* -------------------------------------------------------------------------- */

.disk-item {
    margin-bottom: 16px;
    padding: 14px 0;

    display: flex;
    flex-direction: column;
    gap: 8px;

    border-top: 1px solid var(--border);
}

/* Le premier disque d'une colonne ne reçoit pas de ligne au-dessus. */
.disk-item:first-of-type {
    border-top: none;
}

/* Le dernier disque ne crée pas d'espace inutile sous la liste. */
.storage-columns .disk-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Ligne avec le nom du disque à gauche et sa capacité à droite. */
.disk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.disk-name {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--white);
    font-size: 14px;
    font-weight: 600;
}

.disk-size {
    color: var(--gray);
    font-size: 13px;
}

/* Point vert ou rouge placé devant le nom du disque. */
.disk-state {
    width: 8px;
    height: 8px;

    display: block;

    border-radius: 50%;
}

.disk-state.healthy {
    background: var(--green);
}

.disk-state.warning {
    background: var(--red);
}

/* Ligne avec la barre à gauche et le pourcentage à droite. */
.disk-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.disk-progress .storage-bar {
    flex: 1;
    margin: 0;
}

.disk-percent {
    width: 40px;

    color: var(--gray);
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

/* -------------------------------------------------------------------------- */
/*  08.6 — Version compacte des disques dans les deux colonnes                */
/* -------------------------------------------------------------------------- */

.storage-columns .disk-header {
    gap: 8px;
}

.storage-columns .disk-name {
    min-width: 0;

    font-size: 12px;
}

.storage-columns .disk-size {
    margin-left: auto;

    white-space: nowrap;
    font-size: 11px;
}

.storage-columns .disk-progress {
    gap: 8px;
}

.storage-columns .storage-bar {
    height: 6px;
}

.storage-columns .disk-percent {
    width: 32px;

    font-size: 11px;
}

/* 09 - PAGE DOCKER */

/* -------------------------------------------------------------------------- */
/*  09.1 — Résumé général Docker                                              */
/* -------------------------------------------------------------------------- */

.docker-summary-section {
    width: 100%;
}

/* Grille contenant les quatre informations du résumé. */
.docker-summary {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Une colonne du résumé. */
.docker-summary-item {
    min-width: 0;
    min-height: 92px;
    padding: 0 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    text-align: center;
}

/* Ligne verticale entre les différentes colonnes. */
.docker-summary-item + .docker-summary-item {
    border-left: 1px solid var(--border);
}

/* Petit titre gris situé au-dessus de chaque valeur. */
.docker-summary-label {
    color: var(--gray);
    font-size: 12px;
    font-weight: 500;
}

/* Valeur principale : 8 / 8, 12 %, quantité de RAM... */
.docker-summary-value {
    color: var(--white);
    font-size: 21px;
    font-weight: 700;
    white-space: nowrap;
}

/* Pourcentage vert sous le nombre de services actifs. */
.docker-summary-success {
    color: var(--green);
    font-size: 14px;
    font-weight: 600;
}

/* État général de Docker. */
.docker-summary-state {
    font-size: 21px;
    font-weight: 700;
}

.docker-summary-state.healthy {
    color: var(--green);
}

.docker-summary-state.warning {
    color: var(--red);
}

/* Barre utilisée sous le CPU et la RAM. */
.docker-summary-bar {
    width: 100%;
    max-width: 150px;
    height: 7px;

    overflow: hidden;

    border-radius: 999px;
    background: var(--border);
}

/* Partie violette de la barre. */
.docker-summary-bar-fill {
    height: 100%;

    border-radius: 999px;
    background: var(--purple);
}

/* -------------------------------------------------------------------------- */
/*  09.2 — Zone services et détails                                           */
/* -------------------------------------------------------------------------- */

.docker-workspace {
    width: 100%;

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

    margin-top: 12px;
}

.docker-services-panel {
    min-width: 0;
    padding-right: 18px;
}

/* Future colonne des informations du service sélectionné. */
.docker-details-panel {
    min-width: 0;
    padding-left: 18px;

    border-left: 1px solid var(--border);
}

/* -------------------------------------------------------------------------- */
/*  09.3 — Liste des services                                                 */
/* -------------------------------------------------------------------------- */

.docker-services-panel .section-title {
    margin: 10px 0 14px;

    font-size: 12px;
}

.docker-service-list {
    width: 100%;

    display: flex;
    flex-direction: column;
}

/* -------------------------------------------------------------------------- */
/*  09.4 — Une ligne de service                                               */
/* -------------------------------------------------------------------------- */

.docker-service-item {
    position: relative;

    width: 100%;
    min-height: 58px;
    padding: 8px 10px;

    display: grid;
    grid-template-columns: 8px 34px minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 10px;

    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;

    color: var(--white);
    font-family: var(--font);
    text-align: left;

    cursor: pointer;
}

/* Premier service actuellement sélectionné. */
.docker-service-item.active {
    padding-left: 8px;

    border-left: 3px solid var(--purple);
    background: rgba(255, 255, 255, 0.04);
}

.docker-service-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* -------------------------------------------------------------------------- */
/*  09.5 — État du service                                                    */
/* -------------------------------------------------------------------------- */

.docker-service-status {
    width: 8px;
    height: 8px;

    display: block;

    border-radius: 50%;
}

.docker-service-status.running {
    background: var(--green);
}

.docker-service-status.stopped {
    background: var(--red);
}

/* -------------------------------------------------------------------------- */
/*  09.6 — Icône temporaire du service                                        */
/* -------------------------------------------------------------------------- */

.docker-service-icon {
    width: 32px;
    height: 32px;

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

    border: 1px solid var(--purple);
    border-radius: 8px;

    color: var(--purple);
    font-size: 11px;
    font-weight: 700;
}

.plex-icon {
    border-color: #e5a00d;
    color: #e5a00d;
}

.matrix-icon {
    border-color: var(--gray);
    color: var(--white);
}

.teamspeak-icon {
    border-color: #738bd7;
    color: #738bd7;
}

.pihole-icon {
    border-color: var(--red);
    color: var(--red);
}

.files-icon {
    border-color: #4285f4;
    color: #4285f4;
}

.minecraft-icon {
    border-color: var(--green);
    color: var(--green);
}

/* -------------------------------------------------------------------------- */
/*  09.7 — Nom, durée et flèche                                               */
/* -------------------------------------------------------------------------- */

.docker-service-name {
    min-width: 0;

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

    font-size: 13px;
    font-weight: 600;
}

.docker-service-uptime {
    color: var(--gray);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.docker-service-uptime.stopped {
    color: var(--red);
}

.docker-service-arrow {
    color: var(--gray);
    font-size: 22px;
    font-weight: 400;
}

/* -------------------------------------------------------------------------- */
/*  09.8 — Panneau de détails                                                 */
/* -------------------------------------------------------------------------- */

.docker-details-panel .section-title {
    margin: 10px 0 14px;
    font-size: 12px;
}

.docker-detail-content {
    width: 100%;

    display: flex;
    flex-direction: column;
}

.docker-detail-header {
    min-height: 70px;
    padding-bottom: 14px;

    display: flex;
    align-items: center;
    gap: 14px;

    border-bottom: 1px solid var(--border);
}

.docker-detail-icon {
    width: 50px;
    height: 50px;

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

    border: 1px solid var(--purple);
    border-radius: 50%;

    color: var(--purple);
    font-size: 18px;
    font-weight: 700;
}

.docker-detail-name {
    margin: 0;

    color: var(--white);
    font-size: 20px;
    font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/*  09.9 — Informations du service                                            */
/* -------------------------------------------------------------------------- */

.docker-detail-row {
    min-height: 54px;
    padding: 10px 0;

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

    border-bottom: 1px solid var(--border);
}

.docker-detail-label {
    color: var(--gray);
    font-size: 12px;
    font-weight: 500;
}

.docker-detail-value {
    color: var(--gray);
    font-size: 12px;
    font-weight: 500;
    text-align: right;
}

.docker-detail-status {
    display: flex;
    align-items: center;
    gap: 7px;

    font-size: 12px;
    font-weight: 600;
}

.docker-detail-status-dot {
    width: 8px;
    height: 8px;

    display: block;

    border-radius: 50%;
}

.docker-detail-status.running {
    color: var(--green);
}

.docker-detail-status.running .docker-detail-status-dot {
    background: var(--green);
}

.docker-detail-status.stopped {
    color: var(--red);
}

.docker-detail-status.stopped .docker-detail-status-dot {
    background: var(--red);
}

.docker-detail-network {
    line-height: 1.7;
}

/* -------------------------------------------------------------------------- */
/*  09.10 — CPU et RAM du service                                             */
/* -------------------------------------------------------------------------- */

.docker-detail-stat {
    padding: 12px 0;

    border-bottom: 1px solid var(--border);
}

.docker-detail-stat-header {
    margin-bottom: 9px;

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

.docker-detail-bar {
    width: 100%;
    height: 6px;

    overflow: hidden;

    border-radius: 999px;
    background: var(--border);
}

.docker-detail-bar-fill {
    height: 100%;

    border-radius: 999px;
    background: var(--purple);
}

/* -------------------------------------------------------------------------- */
/*  09.11 — Boutons de contrôle                                               */
/* -------------------------------------------------------------------------- */

.docker-detail-actions {
    padding-top: 16px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.docker-action-button {
    min-width: 0;
    min-height: 72px;
    padding: 8px 3px;

    appearance: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border: 1px solid var(--border);
    background: transparent;

    color: var(--gray);
    font-family: var(--font);
    font-size: 8px;
    font-weight: 600;

    cursor: pointer;
}

.docker-action-symbol {
    font-size: 21px;
    line-height: 1;
}

.docker-action-button.restart {
    border-color: var(--purple);
    color: var(--purple);
}

.docker-action-button.stop {
    border-color: var(--red);
    color: var(--red);
}

.docker-action-button:disabled {
    opacity: 0.35;
    cursor: default;
}

/* 10 - PAGE MINECRAFT */

/* -------------------------------------------------------------------------- */
/*  10.0 — Structure compacte de la page                                      */
/* -------------------------------------------------------------------------- */

/* Le contenu Minecraft reste centré verticalement dans la zone principale. */
body[data-page="minecraft"] .main {
    min-height: 0;
    padding: 10px 20px;

    align-items: center;
}

/* Toutes les sections Minecraft restent empilées verticalement. */
.minecraft-page {
    display: flex;
    flex-direction: column;
}

/* Espacements propres à cette page uniquement. */
.minecraft-page .section {
    width: 100%;
    padding: 4px 0;
}

.minecraft-page .section-title {
    gap: 14px;
    margin: 8px 0 10px;

    font-size: 12px;
}

/* Grand logo placé en haut de la page Minecraft */
.minecraft-page-logo {
    width: 100%;
    height: 62px;
    margin-bottom: 20px;

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

    flex-shrink: 0;
    overflow: hidden;
}

.minecraft-page-logo img {
    display: block;

    width: 500px;
    max-width: 80%;
    max-height: 58px;

    object-fit: contain;

    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}

/* -------------------------------------------------------------------------- */
/*  10.1 — Résumé du serveur Minecraft                                       */
/* -------------------------------------------------------------------------- */

.minecraft-server-summary {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.minecraft-server-info {
    position: relative;

    min-width: 0;
    min-height: 54px;
    padding: 7px 10px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

/*
 * Petites séparations verticales centrées.
 * Elles ne touchent plus le haut ni le bas du résumé.
 */
.minecraft-server-info:nth-child(2)::before,
.minecraft-server-info:nth-child(3)::before,
.minecraft-server-info:nth-child(4)::before,
.minecraft-server-info:nth-child(6)::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);

    width: 1px;
    height: 30px;

    background: var(--border);
}

.minecraft-server-label {
    color: var(--gray);
    font-size: 9px;
    font-weight: 500;
}

.minecraft-server-value {
    min-width: 0;

    overflow: hidden;

    color: var(--white);
    font-size: 13px;
    font-weight: 700;

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

/* Deuxième ligne du résumé. */
.minecraft-server-address,
.minecraft-server-players {
    border-top: 1px solid var(--border);
}

/* Adresse : trois colonnes sur la deuxième ligne. */
.minecraft-server-address {
    grid-column: span 3;
}

/* Nombre de joueurs : dernière colonne. */
.minecraft-server-players {
    grid-column: span 1;
}

/* -------------------------------------------------------------------------- */
/*  État du serveur                                                           */
/* -------------------------------------------------------------------------- */

.minecraft-server-state {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 13px;
    font-weight: 700;
}

.minecraft-server-state-dot {
    width: 6px;
    height: 6px;

    display: block;
    flex-shrink: 0;

    border-radius: 50%;
}

.minecraft-server-state.online {
    color: var(--green);
}

.minecraft-server-state.online .minecraft-server-state-dot {
    background: var(--green);
}

.minecraft-server-state.starting {
    color: var(--purple);
}

.minecraft-server-state.starting .minecraft-server-state-dot {
    background: var(--purple);
}

.minecraft-server-state.stopped {
    color: var(--red);
}

.minecraft-server-state.stopped .minecraft-server-state-dot {
    background: var(--red);
}

/* -------------------------------------------------------------------------- */
/*  10.2 — Liste des joueurs                                                  */
/* -------------------------------------------------------------------------- */

.minecraft-player-list {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.minecraft-player-card {
    min-width: 0;
    min-height: 76px;
    padding: 8px;

    display: flex;
    align-items: center;
    gap: 8px;

    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
}

/* -------------------------------------------------------------------------- */
/*  Tête du skin                                                              */
/* -------------------------------------------------------------------------- */

.minecraft-player-avatar {
    position: relative;

    width: 38px;
    height: 38px;

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

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
}

.minecraft-player-avatar img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: block;
    object-fit: cover;

    image-rendering: pixelated;
}

.minecraft-player-avatar-fallback {
    color: var(--purple);
    font-size: 15px;
    font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/*  Informations du joueur                                                   */
/* -------------------------------------------------------------------------- */

.minecraft-player-info {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.minecraft-player-name {
    overflow: hidden;

    color: var(--white);
    font-size: 11px;
    font-weight: 700;

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

.minecraft-player-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.minecraft-player-detail {
    min-width: 0;

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

    color: var(--gray);
    font-size: 8px;
}

.minecraft-player-detail-value {
    color: var(--white);
    font-weight: 600;
    white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/*  Couleur du ping                                                           */
/* -------------------------------------------------------------------------- */

.minecraft-player-ping.good {
    color: var(--green);
}

.minecraft-player-ping.medium {
    color: var(--purple);
}

.minecraft-player-ping.bad {
    color: var(--red);
}

/* -------------------------------------------------------------------------- */
/*  Emplacement vide                                                         */
/* -------------------------------------------------------------------------- */

.minecraft-player-card.empty {
    opacity: 0.5;
}

.minecraft-player-card.empty .minecraft-player-avatar {
    border-style: dashed;
}

.minecraft-player-card.empty .minecraft-player-name {
    color: var(--gray);
}

/* -------------------------------------------------------------------------- */
/*  10.3 — Performances Minecraft                                             */
/* -------------------------------------------------------------------------- */

.minecraft-performance-grid {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.minecraft-performance-item {
    position: relative;

    min-width: 0;
    min-height: 68px;
    padding: 7px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    text-align: center;
}

/* Petites séparations verticales centrées. */
.minecraft-performance-item:not(:first-child)::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);

    width: 1px;
    height: 34px;

    background: var(--border);
}

.minecraft-performance-label {
    color: var(--gray);
    font-size: 9px;
    font-weight: 500;
}

.minecraft-performance-value {
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.minecraft-performance-subtitle {
    color: var(--gray);
    font-size: 8px;
}

/* Barres CPU et RAM. */

.minecraft-performance-bar {
    width: 100%;
    height: 5px;

    overflow: hidden;

    border-radius: 999px;
    background: var(--border);
}

.minecraft-performance-bar-fill {
    height: 100%;

    border-radius: 999px;
    background: var(--purple);
}

/* -------------------------------------------------------------------------- */
/*  10.5 — Administration du serveur                                          */
/* -------------------------------------------------------------------------- */

.minecraft-admin-grid {
    width: 100%;

    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 14px;
}

.minecraft-events-panel,
.minecraft-controls-panel {
    min-width: 0;
}

.minecraft-admin-subtitle {
    margin-bottom: 6px;

    color: var(--gray);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

/* -------------------------------------------------------------------------- */
/*  Événements récents                                                        */
/* -------------------------------------------------------------------------- */

.minecraft-events-list {
    width: 100%;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--card);
}

.minecraft-event-item {
    min-width: 0;
    min-height: 27px;
    padding: 5px 7px;

    display: grid;
    grid-template-columns: 6px 34px minmax(0, 1fr);
    align-items: center;
    gap: 7px;

    border-bottom: 1px solid var(--border);
}

.minecraft-event-item:last-child {
    border-bottom: none;
}

.minecraft-event-dot {
    width: 6px;
    height: 6px;

    display: block;

    border-radius: 50%;
}

.minecraft-event-dot.join {
    background: var(--green);
}

.minecraft-event-dot.leave {
    background: var(--gray);
}

.minecraft-event-dot.death {
    background: var(--red);
}

.minecraft-event-dot.startup {
    background: var(--purple);
}

.minecraft-event-time {
    color: var(--gray);
    font-size: 8px;
    white-space: nowrap;
}

.minecraft-event-message {
    min-width: 0;

    overflow: hidden;

    color: var(--white);
    font-size: 9px;

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

/* -------------------------------------------------------------------------- */
/*  Boutons d'administration                                                  */
/* -------------------------------------------------------------------------- */

.minecraft-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.minecraft-control-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.minecraft-admin-button {
    min-width: 0;
    min-height: 48px;
    padding: 6px 3px;

    appearance: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    border: 1px solid var(--border);
    background: transparent;

    color: var(--gray);
    font-family: var(--font);
    font-size: 7px;
    font-weight: 600;

    cursor: pointer;
}

.minecraft-admin-button-symbol {
    font-size: 18px;
    line-height: 1;
}

/* Bouton de sauvegarde sur toute la largeur. */
.minecraft-admin-button.backup {
    min-height: 39px;

    flex-direction: row;
    gap: 9px;

    border-color: var(--purple);
    color: var(--purple);

    font-size: 8px;
}

/* Redémarrer en violet. */
.minecraft-admin-button.restart {
    border-color: var(--purple);
    color: var(--purple);
}

/* Arrêter en rouge. */
.minecraft-admin-button.stop {
    border-color: var(--red);
    color: var(--red);
}

/* Bouton indisponible. */
.minecraft-admin-button:disabled {
    opacity: 0.35;
    cursor: default;
}

/* 11 - PAGE RÉSEAU DÉTAILLÉ */

/* -------------------------------------------------------------------------- */
/*  11.0 — Structure compacte de la page                                      */
/* -------------------------------------------------------------------------- */

body[data-page="reseau"] .main {
    min-height: 0;
    padding: 10px 20px;

    align-items: center;
}

.network-page {
    display: flex;
    flex-direction: column;
}

.network-page .section {
    width: 100%;
    padding: 4px 0;
}

.network-page .section-title {
    gap: 14px;
    margin: 8px 0 10px;

    font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/*  11.1 — Résumé réseau                                                      */
/* -------------------------------------------------------------------------- */

.network-summary-grid {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.network-summary-item {
    position: relative;

    min-width: 0;
    min-height: 54px;
    padding: 7px 10px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

/*
 * Petites séparations verticales entre les colonnes.
 */
.network-summary-item:nth-child(2)::before,
.network-summary-item:nth-child(3)::before,
.network-summary-item:nth-child(5)::before,
.network-summary-item:nth-child(6)::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);

    width: 1px;
    height: 30px;

    background: var(--border);
}

/*
 * Ligne horizontale entre les deux rangées.
 */
.network-summary-item:nth-child(n + 4) {
    border-top: 1px solid var(--border);
}

/* Petit titre gris. */
.network-summary-label {
    color: var(--gray);
    font-size: 9px;
    font-weight: 500;
}

/* Valeurs principales. */
.network-summary-value {
    min-width: 0;

    overflow: hidden;

    color: var(--white);
    font-size: 13px;
    font-weight: 700;

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

/* État avec point coloré. */
.network-summary-state {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 13px;
    font-weight: 700;
}

.network-state-dot {
    width: 8px;
    height: 8px;

    display: block;
    flex-shrink: 0;

    border-radius: 50%;
}

/* Réseau connecté. */
.network-summary-state.online {
    color: var(--green);
}

.network-summary-state.online .network-state-dot {
    background: var(--green);
}

/* Réseau déconnecté. */
.network-summary-state.offline {
    color: var(--red);
}

.network-summary-state.offline .network-state-dot {
    background: var(--red);
}

/* Heure de mise à jour sous le résumé. */
.network-last-update {
    margin-top: 5px;
    padding-right: 2px;

    color: var(--gray);
    font-size: 8px;
    font-weight: 500;
    text-align: right;
}

/* -------------------------------------------------------------------------- */
/*  11.2 — Débit réseau                                                       */
/* -------------------------------------------------------------------------- */

/* Deux graphiques placés côte à côte. */
.network-speed-grid {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* Carte contenant un graphique. */
.network-speed-card {
    min-width: 0;
    padding: 9px;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
}

/* Titre à gauche et unité à droite. */
.network-speed-header {
    margin-bottom: 6px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.network-speed-title {
    min-width: 0;

    overflow: hidden;

    color: var(--white);
    font-size: 10px;
    font-weight: 600;

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

.network-speed-unit {
    color: var(--gray);
    font-size: 8px;
    font-weight: 500;
}

/* Zone du graphique. */
.network-speed-chart {
    width: 100%;
    height: 105px;

    display: block;
}

/* Lignes horizontales de fond. */
.network-speed-chart line {
    stroke: var(--border);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

/* Valeurs et minutes affichées dans les graphiques. */
.network-speed-chart text {
    fill: var(--gray);

    font-family: var(--font);
    font-size: 7px;
    font-weight: 500;
}

/* Courbe violette générée par JavaScript. */
.network-speed-chart polyline {
    fill: none;
    stroke: var(--purple);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;

    vector-effect: non-scaling-stroke;
}

/* Icône et nom du graphique. */
.network-speed-name {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 7px;
}

.network-speed-icon {
    width: 17px;
    height: 17px;

    display: block;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/*  11.3 — Qualité Internet                                                   */
/* -------------------------------------------------------------------------- */

/* Graphique du ping à gauche et perte de paquets à droite. */
.network-quality-grid {
    width: 100%;

    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.55fr);
    gap: 10px;
}

/* -------------------------------------------------------------------------- */
/*  Carte du ping                                                             */
/* -------------------------------------------------------------------------- */

.network-ping-card {
    min-width: 0;
    padding: 9px;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
}

/* Titre à gauche et unité à droite. */
.network-quality-header {
    margin-bottom: 6px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.network-quality-name {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 5px;
}

.network-quality-title {
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
}

.network-quality-period {
    color: var(--gray);
    font-size: 8px;
    font-weight: 500;
    white-space: nowrap;
}

.network-quality-unit {
    color: var(--gray);
    font-size: 8px;
    font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/*  Graphique du ping                                                         */
/* -------------------------------------------------------------------------- */

.network-ping-chart {
    width: 100%;
    height: 105px;

    display: block;
}

/* Grille du graphique. */
.network-ping-chart line {
    stroke: var(--border);
    stroke-width: 1;

    vector-effect: non-scaling-stroke;
}

/* Valeurs et minutes. */
.network-ping-chart text {
    fill: var(--gray);

    font-family: var(--font);
    font-size: 7px;
    font-weight: 500;
}

/* Courbe du ping. */
.network-ping-chart polyline {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;

    vector-effect: non-scaling-stroke;
}

/* Bon ping. */
.network-ping-chart polyline.good {
    stroke: var(--green);
}

/* Ping moyen. */
.network-ping-chart polyline.medium {
    stroke: var(--orange);
}

/* Mauvais ping. */
.network-ping-chart polyline.bad {
    stroke: var(--red);
}

/* -------------------------------------------------------------------------- */
/*  Carte de perte de paquets                                                 */
/* -------------------------------------------------------------------------- */

.network-packet-loss-card {
    min-width: 0;
    padding: 9px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);

    text-align: center;
}

.network-packet-loss-label {
    color: var(--gray);
    font-size: 9px;
    font-weight: 500;
}

.network-packet-loss-value {
    font-size: 23px;
    font-weight: 700;
    line-height: 1;
}

.network-packet-loss-value.good {
    color: var(--green);
}

.network-packet-loss-value.medium {
    color: var(--orange);
}

.network-packet-loss-value.bad {
    color: var(--red);
}

.network-packet-loss-subtitle {
    color: var(--gray);
    font-size: 8px;
    font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/*  11.4 — Accès extérieur                                                    */
/* -------------------------------------------------------------------------- */

.network-external-list {
    position: relative;

    width: 100%;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
}

/* Séparation verticale centrale. */
.network-external-list::before {
    content: "";

    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;

    width: 1px;

    background: var(--border);
}

/* Une adresse extérieure. */
.network-external-item {
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;

    display: flex;
    align-items: center;
    gap: 8px;

    border-bottom: 1px solid var(--border);
}

/* Pas de ligne inutile sous la dernière adresse. */
.network-external-item:last-child {
    border-bottom: none;
}

/* Point d'état. */
.network-external-dot {
    width: 7px;
    height: 7px;

    display: block;
    flex-shrink: 0;

    border-radius: 50%;
}

/* Adresse du service. */
.network-external-address {
    min-width: 0;

    overflow: hidden;

    font-size: 9px;
    font-weight: 600;

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

/* Adresse accessible. */
.network-external-item.active {
    color: var(--green);
}

.network-external-item.active .network-external-dot {
    background: var(--green);
}

/* Adresse inaccessible. */
.network-external-item.inactive {
    color: var(--red);
}

.network-external-item.inactive .network-external-dot {
    background: var(--red);
}

/* 12 - PAGE PARAMÈTRES */

/* -------------------------------------------------------------------------- */
/*  12.0 — Structure de la page                                               */
/* -------------------------------------------------------------------------- */

body[data-page="parametres"] .main {
    min-height: 0;
    padding: 10px 20px;

    align-items: center;
}

.settings-page {
    display: flex;
    flex-direction: column;
}

.settings-page .section {
    width: 100%;
    padding: 4px 0;
}

.settings-page .section-title {
    gap: 14px;
    margin: 8px 0 10px;

    font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/*  12.1 — Réglage de l’écran                                                 */
/* -------------------------------------------------------------------------- */

.settings-card {
    width: 100%;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
}

.settings-row {
    min-height: 72px;
    padding: 12px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.settings-row-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.settings-row-title {
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
}
/* -------------------------------------------------------------------------- */
/*  Curseur de luminosité                                                     */
/* -------------------------------------------------------------------------- */

.settings-brightness-slider {
    width: 55%;

    cursor: pointer;

    accent-color: var(--purple);
}

.settings-brightness-slider:focus {
    outline: none;
}

/* -------------------------------------------------------------------------- */
/*  Simulation de la luminosité                                               */
/* -------------------------------------------------------------------------- */

.screen-brightness-overlay {
    position: fixed;
    z-index: 9999;
    inset: 0;

    pointer-events: none;

    background: #000000;
    opacity: 0;

    transition: opacity 80ms linear;
}

/* -------------------------------------------------------------------------- */
/*  12.2 — Sécurité                                                           */
/* -------------------------------------------------------------------------- */

/* Par défaut : affichage destiné à l’écran tactile du NAS. */
.settings-pin-button {
    display: none;
}

.settings-pc-only-message {
    max-width: 190px;

    color: var(--gray);
    font-size: 9px;
    font-weight: 500;
    line-height: 1.4;
    text-align: right;
}

/* Sur ordinateur : le bouton remplace le message. */
@media (min-width: 768px) {
    .settings-pin-button {
        min-height: 38px;
        padding: 0 15px;

        display: block;

        border: 1px solid var(--purple);
        border-radius: 7px;
        background: transparent;

        color: var(--purple);
        font-family: var(--font);
        font-size: 10px;
        font-weight: 600;

        cursor: pointer;
    }

    .settings-pin-button:hover {
        background: rgba(106, 37, 204, 0.12);
    }

    .settings-pc-only-message {
        display: none;
    }
}

/* -------------------------------------------------------------------------- */
/*  12.3 — Fenêtre de modification du PIN                                     */
/* -------------------------------------------------------------------------- */

.settings-modal[hidden] {
    display: none;
}

.settings-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;

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

    padding: 20px;
}

.settings-modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.82);
}

.settings-modal-content {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 420px;
    padding: 22px;

    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
}

.settings-modal-title {
    margin: 0 0 20px;

    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

/* -------------------------------------------------------------------------- */
/*  Champs du formulaire                                                      */
/* -------------------------------------------------------------------------- */

.settings-form-field {
    margin-bottom: 14px;

    display: flex;
    flex-direction: column;
    gap: 7px;
}

.settings-form-label {
    color: var(--gray);
    font-size: 10px;
    font-weight: 500;
}

.settings-form-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
    background: var(--background);

    color: var(--white);
    font-family: var(--font);
    font-size: 12px;
}

.settings-form-input:focus {
    border-color: var(--purple);
}

.settings-form-message {
    min-height: 16px;
    margin: 3px 0 12px;

    color: var(--red);
    font-size: 9px;
    font-weight: 500;
    text-align: center;
}

.settings-form-message.success {
    color: var(--green);
}

/* -------------------------------------------------------------------------- */
/*  Boutons de la fenêtre                                                     */
/* -------------------------------------------------------------------------- */

.settings-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.settings-modal-button {
    min-height: 40px;

    border-radius: 7px;
    background: transparent;

    font-family: var(--font);
    font-size: 10px;
    font-weight: 600;

    cursor: pointer;
}

.settings-modal-button.cancel {
    border: 1px solid var(--border);
    color: var(--gray);
}

.settings-modal-button.confirm {
    border: 1px solid var(--purple);
    color: var(--purple);
}

.settings-modal-button.cancel:hover {
    background: rgba(255, 255, 255, 0.04);
}

.settings-modal-button.confirm:hover {
    background: rgba(106, 37, 204, 0.12);
}

/* -------------------------------------------------------------------------- */
/*  12.4 — Alimentation                                                       */
/* -------------------------------------------------------------------------- */

.settings-power-grid {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.settings-power-button {
    min-width: 0;
    min-height: 105px;
    padding: 12px;

    appearance: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border-radius: 8px;
    background: var(--card);

    font-family: var(--font);
    text-align: center;

    cursor: pointer;
}

.settings-power-symbol {
    font-size: 25px;
    line-height: 1;
}

.settings-power-title {
    font-size: 11px;
    font-weight: 700;
}
/* Redémarrage en violet. */
.settings-power-button.restart {
    border: 1px solid var(--purple);
    color: var(--purple);
}

.settings-power-button.restart:hover {
    background: rgba(106, 37, 204, 0.12);
}

/* Extinction en rouge. */
.settings-power-button.shutdown {
    border: 1px solid var(--red);
    color: var(--red);
}

.settings-power-button.shutdown:hover {
    background: rgba(231, 76, 60, 0.12);
}

/* 13 - RESPONSIVE */

/* Ajustements utilisés sur l'écran vertical du NAS et les petites fenêtres. */
@media (max-width: 800px) {
    .header {
        height: 125px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .logo {
        width: 48px;
    }

    .brand-name {
        font-size: 22px;
    }

    .header-left {
        gap: 6px;
    }

    .header-right {
        gap: 14px;
    }

    .status {
        font-size: 11px;
    }

    .status-dot {
        width: 8px;
        height: 8px;
    }

    .header-center {
        gap: 14px;
        font-size: 11px;
    }
}

/* ========================================================================== */
/*  14. AJUSTEMENTS DE LISIBILITÉ ET GRAPHIQUES                               */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/*  Minecraft — aucun texte d'information sous 9 px                           */
/* -------------------------------------------------------------------------- */

.minecraft-page .section-title {
    font-size: 13px;
}

.minecraft-server-label,
.minecraft-performance-label,
.minecraft-admin-subtitle {
    font-size: 10px;
}

.minecraft-server-value {
    font-size: 14px;
}

.minecraft-server-state {
    font-size: 14px;
}

.minecraft-player-name {
    font-size: 12px;
}

.minecraft-player-detail {
    font-size: 10px;
}

.minecraft-performance-value {
    font-size: 16px;
}

.minecraft-performance-subtitle {
    font-size: 9px;
}

.minecraft-event-time {
    font-size: 9px;
}

.minecraft-event-message {
    font-size: 10px;
}

.minecraft-admin-button {
    font-size: 9px;
}

.minecraft-admin-button.backup {
    font-size: 9px;
}

/* -------------------------------------------------------------------------- */
/*  Réseau — textes plus grands et SVG non déformés                           */
/* -------------------------------------------------------------------------- */

.network-page .section-title {
    font-size: 13px;
}

.network-summary-label {
    font-size: 10px;
}

.network-summary-value,
.network-summary-state {
    font-size: 14px;
}

.network-last-update {
    font-size: 9px;
}

.network-speed-title,
.network-quality-title {
    font-size: 11px;
}

.network-speed-unit,
.network-quality-period,
.network-quality-unit {
    font-size: 9px;
}

.network-speed-chart,
.network-ping-chart {
    height: 112px;

    shape-rendering: geometricPrecision;
}

.network-speed-chart text,
.network-ping-chart text {
    font-size: 9px;
    font-weight: 500;
}

.network-speed-chart line,
.network-ping-chart line {
    stroke: #333333;
}

.network-speed-chart polyline,
.network-ping-chart polyline {
    stroke-width: 2.75;
}

.network-packet-loss-label {
    font-size: 10px;
}

.network-packet-loss-subtitle {
    font-size: 9px;
}

/* ========================================================================== */
/*  15. AJUSTEMENTS FINAUX MINECRAFT                                         */
/* ========================================================================== */

/* Le résumé Minecraft tient maintenant sur une seule ligne de quatre blocs. */
.minecraft-server-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.minecraft-server-info {
    min-height: 58px;
}

.minecraft-server-address,
.minecraft-server-players {
    grid-column: span 1;
    border-top: none;
}

/* Informations de sauvegarde intégrées directement dans Administration. */
.minecraft-backup-status {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--card);
}

.minecraft-backup-status-item {
    min-width: 0;
    min-height: 37px;
    padding: 6px 8px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.minecraft-backup-status-item + .minecraft-backup-status-item {
    border-left: 1px solid var(--border);
}

.minecraft-backup-status-label {
    color: var(--gray);
    font-size: 10px;
    font-weight: 500;
}

.minecraft-backup-status-value {
    overflow: hidden;

    color: var(--white);
    font-size: 12px;
    font-weight: 700;

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

.minecraft-backup-status-value.healthy {
    color: var(--green);
}

/* ========================================================================== */
/*  16. PAVÉ PIN COMMUN                                                       */
/* ========================================================================== */

.goetia-pin-modal {
    position: fixed;
    z-index: 9000;
    inset: 0;

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

    padding: 14px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(5px);

    opacity: 0;
    transition: opacity 150ms ease;
}

.goetia-pin-modal[hidden] {
    display: none;
}

.goetia-pin-modal.open {
    opacity: 1;
}

.goetia-pin-panel {
    width: min(320px, calc(100vw - 28px));
    padding: 18px;

    box-sizing: border-box;

    background: #0d0d0f;
    border: 1px solid rgba(139, 69, 255, 0.65);
    border-radius: 10px;

    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.8),
        0 0 18px rgba(139, 69, 255, 0.15);

    transform: scale(0.96);
    transition: transform 150ms ease;
}

.goetia-pin-modal.open .goetia-pin-panel {
    transform: scale(1);
}

.goetia-pin-panel h2 {
    margin: 0;

    color: #ffffff;
    font-family: "Dela Gothic One", sans-serif;
    font-size: 18px;
    text-align: center;
}

.goetia-pin-action {
    min-height: 18px;
    margin: 5px 0 12px;

    color: #a9a9ae;
    font-size: 12px;
    text-align: center;
}

.goetia-pin-dots {
    display: flex;
    justify-content: center;
    gap: 10px;

    margin-bottom: 9px;
}

.goetia-pin-dots span {
    width: 10px;
    height: 10px;

    box-sizing: border-box;

    border: 1px solid #77777d;
    border-radius: 50%;

    background: transparent;
}

.goetia-pin-dots span.filled {
    border-color: #8b45ff;
    background: #8b45ff;

    box-shadow: 0 0 7px rgba(139, 69, 255, 0.65);
}

.goetia-pin-message {
    min-height: 16px;
    margin: 0 0 10px;

    color: #8e8e94;
    font-size: 11px;
    text-align: center;
}

.goetia-pin-message.error {
    color: #ff565f;
}

.goetia-pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.goetia-pin-keypad button,
.goetia-pin-validate {
    height: 46px;

    border: 1px solid #29292e;
    border-radius: 6px;

    background: #151518;
    color: #ffffff;

    font-family: inherit;
    font-size: 17px;
    font-weight: 600;

    cursor: pointer;
    touch-action: manipulation;
}

.goetia-pin-keypad button:active,
.goetia-pin-validate:active {
    transform: scale(0.95);
}

.goetia-pin-keypad button:hover {
    border-color: #8b45ff;
}

.goetia-pin-keypad .pin-cancel {
    color: #c2c2c6;
    font-size: 10px;
}

.goetia-pin-keypad .pin-delete {
    color: #c2c2c6;
    font-size: 18px;
}

.goetia-pin-validate {
    width: 100%;
    height: 42px;
    margin-top: 8px;

    border-color: #8b45ff;
    background: rgba(139, 69, 255, 0.18);

    color: #b98cff;
    font-size: 12px;
}

.goetia-pin-validate:hover {
    background: rgba(139, 69, 255, 0.28);
}

.goetia-pin-panel.shake {
    animation: goetia-pin-shake 240ms ease;
}

@keyframes goetia-pin-shake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-7px);
    }

    75% {
        transform: translateX(7px);
    }
}

/* ==========================================================
   ICÔNES D’ACTION SVG
   ========================================================== */

/*
 * Les quatre SVG ont maintenant un cadrage harmonisé : une seule
 * taille suffit pour qu'ils paraissent cohérents entre eux.
 */
.action-icon {
    width: 20px;
    height: 20px;

    display: inline-block;
    flex-shrink: 0;

    background-color: currentColor;

    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;

    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.icon-start {
    mask-image: url("../assets/icons/demarrer.svg?v=icons-2");
    -webkit-mask-image: url("../assets/icons/demarrer.svg?v=icons-2");
}

.icon-restart {
    mask-image: url("../assets/icons/redemarrer.svg?v=icons-2");
    -webkit-mask-image: url("../assets/icons/redemarrer.svg?v=icons-2");
}

.icon-power {
    mask-image: url("../assets/icons/eteindre.svg?v=icons-2");
    -webkit-mask-image: url("../assets/icons/eteindre.svg?v=icons-2");
}

.icon-backup {
    mask-image: url("../assets/icons/sauvegarde.svg?v=icons-2");
    -webkit-mask-image: url("../assets/icons/sauvegarde.svg?v=icons-2");
}

/* Les grands boutons d'alimentation peuvent accueillir 20 px. */
.settings-power-symbol .action-icon {
    width: 20px;
    height: 20px;
}
