/*
LEVELSYS — Thème du portail LemonLDAP::NG — version consolidée 2026-10-11
Fichier serveur : /srv/lemonldap-ng/branding/levelsys.css
Champ CSS personnalisé : levelsys/levelsys.css

Consolidation fidèle : ordre des règles, sélecteurs, valeurs et !important conservés.
Les doublons sont intentionnels pour cette migration. Ne pas déplacer les blocs.
Les ressources url("./...") restent dans le même répertoire branding.
Le CSS du Manager reste indépendant : manager.css.
Retour arrière : CSS personnalisé = levelsys/custom-errors.css, puis Ctrl+Maj+R.

SOMMAIRE (rechercher SECTION NN dans ce fichier)
01 — Palette, portail, navigation et styles de base
02 — Compatibilité historique des logos par catégorie
03 — Connexion : structure et formulaire
04 — Fond clair, logos et ajustements du login
05 — Applications : grille commune et dimensions des tuiles
06 — Transparence, bandeau de connexion et pages MFA
07 — Superposition : menu déroulant et logo
08 — Fond du portail pendant le défilement
09 — Pages d’erreur : logo, messages et boutons
*/

/* ==================== SECTION 01 ====================
Palette, portail, navigation et styles de base
Source historique : custom.css
======================================================== */
:root {
    --ls-purple: #633580;
    --ls-purple-dark: #432355;
    --ls-dark: #242230;
    --ls-text: #302b3a;
    --ls-muted: #686172;
    --ls-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

/* Page connectée : supprimer l'espace réservé au grand logo */
body:has(#menucontent) #wrap {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Logo aligné avec le début de la barre de navigation */
body:has(#menucontent) #header {
    position: absolute;
    top: 24px;
    left: max(32px, calc((100% - 1600px) / 2 + 16px));
    width: 108px;
    height: 72px;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20;
}

body:has(#menucontent) #header img {
    width: 108px !important;
    height: 72px !important;
    max-width: 100%;
    object-fit: contain;
    background: rgba(255, 255, 255, .94);
    border-radius: 7px;
    padding: 5px;
    margin: 0 !important;
}

body:has(#menucontent) #header a,
body:has(#menucontent) #header h1,
body:has(#menucontent) #header p {
    margin: 0 !important;
    padding: 0 !important;
}

/* Plus de largeur pour les applications */
#menucontent {
    width: calc(100% - 32px);
    max-width: 1600px;
    margin: 0 auto !important;
    padding: 16px 0 24px !important;
}

/* Menu en haut, avec de la place pour le logo */
#menu .navbar {
    background: rgba(36, 34, 48, .97) !important;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    min-height: 88px;
    padding: 12px 16px 12px 136px;
    margin: 0 0 18px;
    box-shadow: var(--ls-shadow);
}

#menu .navbar .navbar-brand,
#menu .navbar .nav-link,
#menu .navbar .user .text-muted {
    color: #f4f0f7 !important;
}

#menu .navbar .nav-item {
    background: transparent !important;
    border-radius: 7px;
}

#menu .navbar .nav-link {
    background: transparent;
    border-radius: 7px;
    padding: 9px 12px;
}

/* Corriger l'état sélectionné sur le parent ET sur le lien */
#menu .navbar .nav-item.active,
#menu .navbar .nav-item.selected,
#menu .navbar .nav-item.ui-state-active,
#menu .navbar .nav-item[aria-selected="true"],
#menu .navbar .nav-item.active > .nav-link,
#menu .navbar .nav-link.active,
#menu .navbar .nav-link[aria-selected="true"],
#menu .navbar .nav-link:hover,
#menu .navbar .nav-link:focus {
    background: var(--ls-purple) !important;
    color: #fff !important;
    border-color: transparent !important;
}

#menu .navbar a:focus-visible {
    outline: 2px solid #e4c7f5;
    outline-offset: 2px;
}

#menu .navbar-toggler {
    border-color: rgba(255, 255, 255, .5);
}

#menu .navbar-toggler-icon {
    filter: invert(1);
}

/* Menu utilisateur */
#menu .dropdown-menu {
    background: var(--ls-dark);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 9px;
    padding: 6px;
    box-shadow: var(--ls-shadow);
}

#menu .dropdown-item {
    background: transparent;
    padding: 0;
    border-radius: 6px;
}

#menu .dropdown-item:hover,
#menu .dropdown-item:focus-within {
    background: var(--ls-purple);
}

/* Catégories et panneaux : historique, mot de passe, etc. */
#appslist .category,
#menu > div > .card {
    background: rgba(248, 246, 251, .95);
    border: 1px solid rgba(255, 255, 255, .4) !important;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: var(--ls-shadow);
}

#appslist .category > .card-header,
#menu > div > .card > .card-header {
    background: linear-gradient(
        110deg, var(--ls-purple-dark), var(--ls-purple)
    ) !important;
    border: 0;
    border-radius: 11px 11px 0 0;
    padding: 12px 20px;
}

#appslist .catname,
#menu > div > .card > .card-header .card-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

#appslist .category > .card-body {
    padding: 18px 18px 4px;
}

/* Applications */
#appslist .application {
    background: #fff;
    border: 1px solid #e2dce9;
    border-radius: 10px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(36, 34, 48, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

#appslist .application:hover,
#appslist .application:focus-within {
    transform: translateY(-3px);
    border-color: var(--ls-purple);
    box-shadow: 0 7px 18px rgba(99, 53, 128, .18);
}

#appslist .application > a {
    display: block;
    color: var(--ls-text);
    text-decoration: none;
    border-radius: inherit;
}

#appslist .application > a:focus-visible {
    outline: 3px solid var(--ls-purple);
    outline-offset: 3px;
}

#appslist .application .card-body {
    padding: 16px;
    min-height: 96px;
}

#appslist .application .card-body > .row {
    align-items: center;
}

#appslist .appname {
    color: var(--ls-purple-dark);
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

#appslist .appdesc {
    color: var(--ls-muted) !important;
    font-size: .88rem;
    line-height: 1.4;
    margin-bottom: 0 !important;
    overflow-wrap: anywhere;
}

#appslist img.applogo {
    display: block;
    width: 56px;
    height: 48px;
    max-width: 100%;
    object-fit: contain;
}

#appslist span.applogo {
    color: var(--ls-purple);
    font-size: 2.4rem;
}

/* Masquer le texte standard, conserver le choix des langues */
#footer {
    background: transparent;
    border: 0;
    color: #fff;
}

#footer p {
    display: none;
}

/* Sur petit écran, placer le logo au-dessus du menu */
@media (max-width: 991.98px) {
    body:has(#menucontent) #wrap {
        height: 88px !important;
    }

    body:has(#menucontent) #header {
        top: 12px;
        left: 20px;
    }

    #menucontent {
        padding-top: 8px !important;
    }

    #menu .navbar {
        min-height: 60px;
        padding: 10px 14px;
    }

    #menu .navbar-collapse {
        padding-top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #appslist .application {
        transition: none;
    }

    #appslist .application:hover,
    #appslist .application:focus-within {
        transform: none;
    }
}

/* ==================== SECTION 02 ====================
Compatibilité historique des logos par catégorie
Source historique : custom-icons.css
======================================================== */
/* Charger le style actuel du portail */


/* Agrandir les logos des deux catégories */
#appslist .category[name="Support"] img.applogo,
#appslist .category[name="Internal tools"] img.applogo {
    width: 96px;
    height: 64px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

/* Donner un peu plus de hauteur aux tuiles */
#appslist .category[name="Support"] .application .card-body,
#appslist .category[name="Internal tools"] .application .card-body {
    min-height: 104px;
}

/* ==================== SECTION 03 ====================
Connexion : structure et formulaire
Source historique : custom-login.css
======================================================== */
/* Conserver le portail personnalisé et les icônes agrandies */


/* Centrer l'ensemble logo + formulaire sur la page de connexion */
body:has(#logincontent) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* Supprimer les dimensions et espaces du bandeau initial */
body:has(#logincontent) #wrap {
    flex: 0 0 auto;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:has(#logincontent) #header {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    text-align: center;
}

body:has(#logincontent) #header a,
body:has(#logincontent) #header h1,
body:has(#logincontent) #header p {
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* Logo : environ 2,25 fois sa largeur initiale */
body:has(#logincontent) #header img {
    display: block;
    width: 450px !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
    margin: 0 auto !important;
    padding: 10px;
    background: rgba(255, 255, 255, .94);
    border-radius: 14px;
    box-shadow: var(--ls-shadow);
}

/* Bloc de connexion compact */
#logincontent {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Bandeau d'information ou d'erreur */
#logincontent #errormsg {
    width: 100%;
    text-align: center;
}

#logincontent #errormsg .alert {
    padding: 14px 18px;
    margin-bottom: 14px;
    border-radius: 10px;
    font-weight: 500;
    text-align: center;
}

/* Carte contenant le formulaire */
#logincontent > .card {
    background: rgba(248, 246, 251, .96);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--ls-shadow);
}

#logincontent form.login {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

#logincontent form.login .form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

#logincontent .buttons {
    margin-top: 18px;
    text-align: center;
}

#logincontent .buttons .btn-success {
    background: var(--ls-purple);
    border-color: var(--ls-purple);
    border-radius: 8px;
    padding: 10px 24px;
}

#logincontent .buttons .btn-success:hover {
    background: var(--ls-purple-dark);
    border-color: var(--ls-purple-dark);
}

/* Footer dans le flux : conserver le sélecteur de langue */
body:has(#logincontent) #footer {
    position: static !important;
    flex: 0 0 auto;
    width: 100%;
    height: auto !important;
    min-height: 0;
    margin-top: 18px;
    padding: 0;
}

/* Réduire le logo sur mobile ou écran peu haut */
@media (max-width: 575.98px), (max-height: 750px) {
    body:has(#logincontent) #header img {
        width: 300px !important;
    }

    body:has(#logincontent) #header {
        margin-bottom: 16px !important;
    }

    #logincontent > .card {
        padding: 20px;
    }
}

/* ==================== SECTION 04 ====================
Fond clair, logos et ajustements du login
Source historique : custom-light.css
======================================================== */
/* Styles existants */


/* Fond clair */
body {
    background-color: #f4f2f7 !important;
    background-image: url("./fond-operateur.png") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

/* Nouveau logo transparent sur la connexion */
body:has(#logincontent) #header img {
    width: 450px !important;
    height: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Ancien logo sur le portail connecté */
body:has(#menucontent) #header {
    width: 108px;
}

body:has(#menucontent) #header img {
    content: url("./logo.png");
    width: 108px !important;
    height: 72px !important;
    object-fit: contain;
    background: rgba(255, 255, 255, .94) !important;
    border: 0 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    padding: 5px !important;
}

#menu .navbar {
    padding-left: 136px;
}

/* Formulaire clair */
#logincontent > .card {
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(99, 53, 128, .2);
    box-shadow: 0 10px 30px rgba(67, 35, 85, .14);
}

/* Langues sur fond clair */
#footer,
#footer a {
    color: var(--ls-purple-dark);
}

@media (max-width: 991.98px) {
    #menu .navbar {
        padding-left: 14px;
    }
}

@media (max-width: 575.98px), (max-height: 750px) {
    body:has(#logincontent) #header img {
        width: 300px !important;
    }
}

/* ==================== SECTION 05 ====================
Applications : grille commune et dimensions des tuiles
Source historique : custom-tiles.css
======================================================== */


/* Grille commune à toutes les catégories */
#menu #appslist .category > .card-body {
    padding: 18px;
}

#menu #appslist .category > .card-body > .row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

/* Neutraliser les dimensions des colonnes Bootstrap */
#menu #appslist .category > .card-body > .row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: none;
    padding: 0;
}

/* Dimensions identiques avec ou sans description */
#menu #appslist .application {
    height: 100%;
    margin: 0;
    border-radius: 12px;
}

#menu #appslist .application > a {
    display: block;
    height: 100%;
    text-decoration: none;
}

#menu #appslist .application .card-body {
    min-height: 190px;
    padding: 20px 14px;
    text-align: center;
    box-sizing: border-box;
}

/* Logo au-dessus des textes */
#menu #appslist .application .card-body > .row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

#menu #appslist .application .card-body > .row > div {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
}

/* Emplacement constant pour tous les logos */
#menu #appslist .application img.applogo {
    display: block;
    width: 120px;
    height: 72px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto 16px;
}

#menu #appslist .application span.applogo {
    display: block;
    height: 72px;
    line-height: 72px;
    font-size: 3rem;
    margin: 0 auto 16px;
}

/* Titres et descriptions centrés */
#menu #appslist .application .appname {
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0 0 6px;
    text-align: center;
    overflow-wrap: anywhere;
}

#menu #appslist .application .appdesc {
    font-size: .85rem;
    line-height: 1.4;
    margin: 0;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Adaptation aux petits écrans */
@media (max-width: 1199px) {
    #menu #appslist .category > .card-body > .row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    #menu #appslist .category > .card-body > .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 419px) {
    #menu #appslist .category > .card-body > .row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==================== SECTION 06 ====================
Transparence, bandeau de connexion et pages MFA
Source historique : custom-final.css
======================================================== */


/* Barre de menu */
#menu .navbar {
    background: rgba(36, 34, 48, 0.82) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Sections d'applications */
#menu #appslist .category {
    background: transparent !important;
}

#menu #appslist .category > .card-body {
    background: rgba(248, 246, 251, 0.94);
    border-radius: 0 0 11px 11px;
}

#menu #appslist .category > .card-header {
    background: linear-gradient(
        110deg,
        rgba(67, 35, 85, 0.60),
        rgba(99, 53, 128, 0.60)
    ) !important;
    border: 0 !important;
}

#menu #appslist .category > .card-header .catname {
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Bandeau du login */
#logincontent #errormsg.alert-warning,
#logincontent #errormsg .alert-warning {
    background: rgba(239, 230, 247, 0.95) !important;
    background-image: none !important;
    border: 1px solid rgba(99, 53, 128, 0.18) !important;
    color: #000 !important;
    text-align: center;
    text-shadow: none;
}

/* Gestionnaire MFA et enregistrement TOTP */
body:has(#remove2fModal, #TOTPName) {
    display: block !important;
    min-height: 100vh !important;
    height: auto !important;
    padding: 32px 16px !important;
    box-sizing: border-box;
    background: #f4f2f7 url("./fond-operateur.png")
                center center / cover no-repeat fixed !important;
}

body:has(#remove2fModal, #TOTPName) #wrap {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto 24px !important;
    padding: 0 !important;
    background: transparent !important;
}

body:has(#remove2fModal, #TOTPName) #header {
    position: static !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body:has(#remove2fModal, #TOTPName) #header :is(a, h1, p) {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
}

body:has(#remove2fModal, #TOTPName) #header img {
    content: url("./logo-levelsys-transparent.png") !important;
    display: block;
    width: 380px !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body:has(#remove2fModal, #TOTPName) > .container,
body:has(#remove2fModal, #TOTPName) #menucontent {
    width: 100% !important;
    max-width: 960px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Bandeaux MFA : mêmes couleurs que sur le login */
body:has(#remove2fModal, #TOTPName) #color:is(
    .message-positive,
    .message-info,
    .message-warning,
    .alert-success,
    .alert-info,
    .alert-warning
) {
    background: rgba(239, 230, 247, 0.95) !important;
    background-image: none !important;
    border: 1px solid rgba(99, 53, 128, 0.18) !important;
    color: #000 !important;
    text-align: center;
    text-shadow: none;
    border-radius: 10px;
    padding: 14px 18px;
}

/* Cartes MFA */
body:has(#remove2fModal, #TOTPName) .container .card {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(99, 53, 128, 0.20) !important;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(67, 35, 85, 0.10);
}

body:has(#remove2fModal, #TOTPName) .card-footer {
    background: rgba(239, 230, 247, 0.95) !important;
    color: #000 !important;
    border-top: 1px solid rgba(99, 53, 128, 0.18);
}

body:has(#remove2fModal, #TOTPName) .card-footer p {
    margin: 0;
}

body:has(#remove2fModal, #TOTPName) .card-body a.nodecor img {
    width: auto;
    height: 120px;
    max-width: 100%;
    object-fit: contain;
}

/* Boutons et pied de page */
body:has(#remove2fModal, #TOTPName) .buttons {
    text-align: center;
    margin: 18px auto;
}

body:has(#remove2fModal, #TOTPName) .btn:is(
    .btn-success,
    .btn-primary,
    .btn-info
) {
    background: #633580 !important;
    border-color: #633580 !important;
    color: #fff !important;
    border-radius: 8px;
}

body:has(#remove2fModal, #TOTPName) .btn:is(
    .btn-success,
    .btn-primary,
    .btn-info
):hover {
    background: #432355 !important;
    border-color: #432355 !important;
}

body:has(#remove2fModal, #TOTPName) #footer {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 18px !important;
    background: transparent !important;
}

@media (max-width: 575px) {
    body:has(#remove2fModal, #TOTPName) {
        padding: 20px 12px !important;
    }

    body:has(#remove2fModal, #TOTPName) #header img {
        width: 280px !important;
    }
}

/* ==================== SECTION 07 ====================
Superposition : menu déroulant et logo
Source historique : custom-dropdown.css
======================================================== */


/* Navigation au-dessus des cartes d'applications */
#menu .navbar {
    position: relative !important;
    z-index: 100;
    overflow: visible !important;
}

/* Menu utilisateur */
#menu .navbar .dropdown-menu {
    z-index: 1000 !important;
}

/* Logo au-dessus de la barre et de son effet de flou */
body:has(#menu .navbar) #header {
    z-index: 200 !important;
}

/* ==================== SECTION 08 ====================
Fond du portail pendant le défilement
Source historique : custom-background.css
======================================================== */


/* Supprimer le fond ancien sous la page du portail */
html:has(#menu .navbar) {
    min-height: 100%;
    height: auto !important;
    background: #f4f2f7 !important;
}

/* Fond unique, conservé pendant tout le défilement */
body:has(#menu .navbar) {
    height: auto !important;
    min-height: 100vh !important;
    background: #f4f2f7 url("./fond-operateur.png")
                center center / cover no-repeat fixed !important;
}

/* Laisser apparaître le fond du body derrière le contenu */
body:has(#menu .navbar) #wrap,
body:has(#menu .navbar) #menu,
body:has(#menu .navbar) #menucontent {
    height: auto !important;
    background: transparent !important;
}

/* ==================== SECTION 09 ====================
Pages d’erreur : logo, messages et boutons
Source historique : custom-errors.css
======================================================== */


/* Mise en page des pages d'erreur */
body:has(#errorcontent) {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    padding: 32px 16px !important;
    box-sizing: border-box;
    background: #f4f2f7 url("./fond-operateur.png")
                center center / cover no-repeat fixed !important;
}

body:has(#errorcontent) #wrap {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto 24px !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Logo : mêmes dimensions que sur les pages MFA */
body:has(#errorcontent) #header {
    position: static !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body:has(#errorcontent) #header :is(a, h1, p) {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
}

body:has(#errorcontent) #header img {
    content: url("./logo-levelsys-transparent.png") !important;
    display: block !important;
    width: 380px !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Bloc d'erreur centré */
#errorcontent {
    width: 100% !important;
    max-width: 960px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
}

#errorcontent .message {
    text-align: center;
    border-radius: 10px;
    padding: 14px 18px;
}

/* Boutons harmonisés avec le thème */
#errorcontent .buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 18px auto;
}

#errorcontent .btn {
    border-radius: 8px;
}

#errorcontent .btn:is(.btn-primary, .btn-info) {
    background: #633580 !important;
    border-color: #633580 !important;
    color: #fff !important;
}

#errorcontent .btn:is(.btn-primary, .btn-info):hover {
    background: #432355 !important;
    border-color: #432355 !important;
}

body:has(#errorcontent) #footer {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 18px !important;
    background: transparent !important;
}

@media (max-width: 575px) {
    body:has(#errorcontent) {
        padding: 20px 12px !important;
    }

    body:has(#errorcontent) #header img {
        width: 280px !important;
    }
}
