/* ============================================================
   Thème "Sabaody" : construit sur le modèle de Metronic, comme les thèmes Bleu, Noël, Halloween et Marine Ford.
   L'archipel des bulles à la tombée du jour : la clairière entre les mangroves rayées, la ville qui s'allume au loin,
   reflets nacrés (menthe, aqua, rose, lavande, or) et bulles de savon qui montent derrière la page (moteur : front/src/lib/sabaody.js).
   Activé par data-bs-theme="sabaody" sur <html>. Tout est limité à ce sélecteur : aucun autre thème n'est touché.
   ============================================================ */

[data-bs-theme="sabaody"] {
    /* === Échelle de gris → palette lagon === */
    --bs-gray-100: #03171d;
    --bs-gray-100-rgb: 3, 23, 29;
    --bs-gray-200: #052129;
    --bs-gray-200-rgb: 5, 33, 41;
    --bs-gray-300: #0a2f39;
    --bs-gray-300-rgb: 10, 47, 57;
    --bs-gray-400: #10424e;
    --bs-gray-400-rgb: 16, 66, 78;
    --bs-gray-500: #4f9fa5;
    --bs-gray-500-rgb: 79, 159, 165;
    --bs-gray-600: #7cc6c7;
    --bs-gray-600-rgb: 124, 198, 199;
    --bs-gray-700: #c5ebe6;
    --bs-gray-700-rgb: 197, 235, 230;
    --bs-gray-800: #def7f2;
    --bs-gray-800-rgb: 222, 247, 242;
    --bs-gray-900: #ffffff;
    --bs-gray-900-rgb: 255, 255, 255;

    /* === Couleurs sémantiques === */
    --bs-white: #ffffff;
    --bs-light: #052129;
    --bs-primary: #10a089;
    --bs-success: #50cd89;
    --bs-info: #8f6bff;
    --bs-warning: #ffc700;
    --bs-danger: #e5484d;
    --bs-dark: #ffffff;
    --bs-secondary: #0a2f39;

    --bs-primary-active: #0d8a76;
    --bs-secondary-active: #10424e;
    --bs-light-active: #0a2f39;
    --bs-success-active: #47be7d;
    --bs-info-active: #7a54f0;
    --bs-warning-active: #f1bc00;
    --bs-danger-active: #c93a40;
    --bs-dark-active: white;

    --bs-primary-light: #073039;
    --bs-success-light: #0b3a33;
    --bs-info-light: #113a4d;
    --bs-warning-light: #2f3a23;
    --bs-danger-light: #3a1f2a;
    --bs-dark-light: #052129;
    --bs-secondary-light: #03171d;
    --bs-red-light: #3a2424;

    --bs-primary-inverse: #ffffff;
    --bs-secondary-inverse: #c5ebe6;
    --bs-light-inverse: #7cc6c7;
    --bs-success-inverse: #ffffff;
    --bs-info-inverse: #ffffff;
    --bs-warning-inverse: #ffffff;
    --bs-danger-inverse: #ffffff;
    --bs-dark-inverse: #03171d;

    --bs-white-rgb: 255, 255, 255;
    --bs-light-rgb: 5, 33, 41;
    --bs-primary-rgb: 16, 160, 137;
    --bs-success-rgb: 80, 205, 137;
    --bs-info-rgb: 143, 107, 255;
    --bs-warning-rgb: 255, 199, 0;
    --bs-danger-rgb: 229, 72, 77;
    --bs-dark-rgb: 255, 255, 255;
    --bs-secondary-rgb: 10, 47, 57;

    /* === Textes === */
    --bs-text-muted: #6fb3b6;
    --bs-text-white: #ffffff;
    --bs-text-primary: #6fe7cd;
    --bs-text-secondary: #0a2f39;
    --bs-text-light: #052129;
    --bs-text-success: #50cd89;
    --bs-text-info: #a98cff;
    --bs-text-warning: #ffc700;
    --bs-text-danger: #ff6b70;
    --bs-text-dark: #ffffff;
    --bs-text-purple: #b68cff;
    --bs-text-gold: #EFBF04;
    --bs-text-blue: #63d2ff;
    --bs-text-orange: #ff9d6b;

    /* Échelle de texte recalibrée pour rester lisible sur le lagon sombre.
       Les --bs-text-gray-N sont indépendantes des --bs-gray-N (backgrounds). */
    --bs-text-gray-100: #0a2f39;
    --bs-text-gray-200: #10424e;
    --bs-text-gray-300: #3d858c;
    --bs-text-gray-400: #5ea8ac;
    --bs-text-gray-500: #86c7c8;
    --bs-text-gray-600: #b3e0dc;
    --bs-text-gray-700: #cdeee9;
    --bs-text-gray-800: #e6faf6;
    --bs-text-gray-900: #ffffff;

    /* === Bordures === */
    --bs-border-color: #145560;
    --bs-border-dashed-color: #1b6a76;

    /* === Composants génériques === */
    --bs-component-active-color: #ffffff;
    --bs-component-active-bg: #10a089;
    --bs-component-hover-color: #6fe7cd;
    --bs-component-hover-bg: #052129;
    --bs-component-checked-color: #ffffff;
    --bs-component-checked-bg: #10a089;

    /* === Ombres === */
    --bs-box-shadow-xs: 0 0.1rem 0.75rem 0.25rem rgba(0, 0, 0, 0.1);
    --bs-box-shadow-sm: 0 0.1rem 1rem 0.25rem rgba(0, 0, 0, 0.1);
    --bs-box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.15);
    --bs-box-shadow-lg: 0 1rem 2rem 1rem rgba(0, 0, 0, 0.2);

    /* === Inputs === */
    --bs-input-color: var(--bs-gray-700);
    --bs-input-bg: var(--bs-body-bg);
    --bs-input-solid-color: var(--bs-gray-700);
    --bs-input-solid-bg: var(--bs-gray-100);
    --bs-input-solid-bg-focus: var(--bs-gray-200);
    --bs-input-solid-placeholder-color: var(--bs-gray-500);

    /* === Tooltips, tables, dropdowns === */
    --bs-tooltip-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.25);
    --bs-card-box-shadow: none;
    --bs-table-striped-bg: rgba(3, 23, 29, 0.55);
    --bs-table-loading-message-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.4);
    --bs-dropdown-bg: #072c35;
    --bs-dropdown-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.4);

    /* === Code === */
    --bs-code-bg: #052129;
    --bs-code-box-shadow: 0px 3px 9px rgba(0, 0, 0, 0.1);
    --bs-code-color: #ff9bd2;

    /* === Symbols, bullets === */
    --bs-symbol-label-color: #def7f2;
    --bs-symbol-label-bg: #03171d;
    --bs-symbol-border-color: rgba(255, 255, 255, 0.5);
    --bs-bullet-bg-color: #10424e;

    /* === ScrollTop === */
    --bs-scrolltop-opacity: 0;
    --bs-scrolltop-opacity-on: 0.3;
    --bs-scrolltop-opacity-hover: 1;
    --bs-scrolltop-box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.1);
    --bs-scrolltop-bg-color: #10a089;
    --bs-scrolltop-bg-color-hover: #0d8a76;
    --bs-scrolltop-icon-color: #ffffff;
    --bs-scrolltop-icon-color-hover: #ffffff;

    /* === Drawers === */
    --bs-drawer-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.15);
    --bs-drawer-bg-color: #072c35;
    --bs-drawer-overlay-bg-color: rgba(0, 0, 0, 0.5);

    /* === Menus / sidebar === */
    --bs-menu-dropdown-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.4);
    --bs-menu-dropdown-bg-color: #072c35;
    --bs-menu-heading-color: #4f9fa5;
    --bs-menu-link-color-hover: #6fe7cd;
    --bs-menu-link-color-show: #6fe7cd;
    --bs-menu-link-color-here: #6fe7cd;
    --bs-menu-link-color-active: #ffffff;
    --bs-menu-link-bg-color-hover: #0b3a45;
    --bs-menu-link-bg-color-show: #0b3a45;
    --bs-menu-link-bg-color-here: #0b3a45;
    --bs-menu-link-bg-color-active: #10a089;

    /* === Scrollbars, overlays === */
    --bs-scrollbar-color: #10424e;
    --bs-scrollbar-hover-color: #1b6a76;
    --bs-overlay-bg: rgba(255, 255, 255, 0.05);
    --bs-blockui-overlay-bg: rgba(255, 255, 255, 0.05);

    /* === Rating, ribbon === */
    --bs-rating-color-default: #10424e;
    --bs-rating-color-active: #FFAD0F;
    --bs-ribbon-label-box-shadow: 0px -1px 5px 0px rgba(255, 255, 255, 0.1);
    --bs-ribbon-label-bg: #10a089;
    --bs-ribbon-label-border-color: #0a6b5c;
    --bs-ribbon-clip-bg: #F9F9F9;

    /* === Engage button === */
    --bs-engage-btn-bg: #052129;
    --bs-engage-btn-box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.4);
    --bs-engage-btn-border-color: #052129;
    --bs-engage-btn-color: #def7f2;
    --bs-engage-btn-icon-color: #7cc6c7;
    --bs-engage-btn-color-active: #def7f2;

    /* === Body (fond global de la page) === */
    --bs-body-bg: #06262e;
    --bs-body-bg-rgb: 6, 38, 46;
    --bs-body-color: #c2e6e2;
    --bs-body-color-rgb: 194, 230, 226;
    --bs-heading-color: #eafffa;

    /* === Surfaces principales (cards, headers) === */
    --bs-card-bg: #0b3d47;
    --bs-card-border-color: #145560;

    /* ============================================================
       Variables LAYOUT spécifiques à Metronic
       (sidebar, header, toolbar, footer, aside)
       ============================================================ */

    /* === Fond global de l'application === */
    --bs-app-bg-color: transparent;
    --bs-app-blank-bg-color: transparent;

    /* === Header (la barre du haut avec "Jeu", "Communauté") === */
    --bs-app-header-base-bg-color: #052129;
    --bs-app-header-base-box-shadow: none;
    --bs-app-header-minimize-bg-color: #052129;
    --bs-app-header-minimize-box-shadow: 0 0.1rem 1rem 0.25rem rgba(0, 0, 0, 0.1);
    --bs-app-header-light-separator-color: #0a2f39;

    /* === Toolbar === */
    --bs-app-toolbar-base-bg-color: #052129;
    --bs-app-toolbar-base-box-shadow: none;
    --bs-app-toolbar-base-border-top: 1px dashed #0a2f39;

    /* === Aside (panneau latéral droit éventuel) === */
    --bs-app-aside-base-bg-color: #052129;

    /* === Footer === */
    --bs-app-footer-bg-color: transparent;
    --bs-app-footer-box-shadow: none;

    /* === Sidebar (la colonne de gauche avec OPRPG, avatar, menu) === */
    --bs-app-sidebar-base-toggle-btn-box-shadow: none;
    --bs-app-sidebar-base-toggle-btn-bg-color: #052129;
    --bs-app-sidebar-base-toggle-btn-border-color: none;
    --bs-app-sidebar-base-border-color: none;
    --bs-app-sidebar-light-bg-color: #052129;
    --bs-app-sidebar-light-box-shadow: none;
    --bs-app-sidebar-light-separator-color: #0a2f39;
    --bs-app-sidebar-light-scrollbar-color-hover: #10424e;
    --bs-app-sidebar-light-menu-heading-color: #4f9fa5;
    --bs-app-sidebar-light-menu-link-bg-color-active: #10a089;
    --bs-app-sidebar-light-header-menu-link-bg-color-active: #0b3a45;
    --bs-app-sidebar-light-menu-link-color: #def7f2;
    --bs-app-sidebar-light-menu-link-color-active: #ffffff;
    --bs-app-sidebar-light-menu-link-icon-color: #6fc9c4;

    /* === Force le fond du body === */
    background-color: var(--bs-body-bg) !important;
}

/* ============================================================
   Règles HORS du bloc principal : sélecteurs composés classiques.
   Le thème est sombre : on cache les éléments destinés au fond clair (logos light, icônes light, etc.)
   et on laisse visibles ceux destinés au fond sombre.
   ============================================================ */

[data-bs-theme="sabaody"] .theme-light-show {
    display: none !important;
}

[data-bs-theme="sabaody"] .theme-dark-show {
    display: inline-block !important;
}

[data-bs-theme="sabaody"] .app-page,
[data-bs-theme="sabaody"] .app-wrapper {
    border-top: none !important;
}

/* ============================================================
   Décor de Sabaody (par-dessus la palette).
   Fond : la clairière de Sabaody à la tombée du jour (image assombrie et teintée d'avance, pour ne rien calculer dans le navigateur) :
   les mangroves rayées de chaque côté, la prairie, la ville qui s'allume au loin. Le menu de gauche a sa propre image, une autre vue
   de l'archipel : le grand tronc du bosquet 44, ses racines et le lagon à son pied.
   Reflets nacrés des bulles (rose, aqua, menthe, or, lavande) en fin liseré autour des cartes, sous l'en-tête et le long du menu.
   ============================================================ */

[data-bs-theme="sabaody"] {
    --sb-fond: url('/assets/media/sabaody/fond.webp?v=2');
    --sb-menu: url('/assets/media/sabaody/menu.webp?v=2');
    --sb-menthe: #6fe7cd;
    --sb-aqua: #63d2ff;
    --sb-rose: #ff9bd2;
    --sb-lavande: #b9a5ff;
    --sb-or: #ffe9a8;
    /* Le film d'une bulle de savon, à plat : sert de liseré */
    --sb-film: linear-gradient(120deg, rgba(255, 155, 210, .62), rgba(99, 210, 255, .58) 26%, rgba(111, 231, 205, .64) 52%, rgba(255, 233, 168, .5) 76%, rgba(185, 165, 255, .6));
    --sb-film-doux: linear-gradient(120deg, rgba(255, 155, 210, .3), rgba(99, 210, 255, .28) 26%, rgba(111, 231, 205, .32) 52%, rgba(255, 233, 168, .24) 76%, rgba(185, 165, 255, .3));
}

/* Fond posé sur un calque fixe qui couvre toujours tout l'écran (un fond sur le body se coupe sur les pages longues, et `fixed` est ignoré sur iOS).
   De l'avant vers l'arrière : reflet rose en haut à droite, voile lagon (dense en haut, où sont les titres, léger en bas, où la clairière se voit),
   la clairière, dégradé de secours. */
[data-bs-theme="sabaody"]::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse 46% 38% at 88% -8%, rgba(255, 155, 210, .10), transparent 70%),
        linear-gradient(180deg, rgba(3, 22, 28, .78) 0%, rgba(3, 26, 33, .50) 24%, rgba(4, 34, 42, .22) 60%, rgba(4, 34, 42, .30) 100%),
        var(--sb-fond) center bottom / cover no-repeat,
        linear-gradient(180deg, #05343a, #0a5a5c);
}
/* Téléphone : un cadrage en portrait (le bord du grand tronc, l'arbre aux racines moussues, le début de la ville), deux fois plus léger */
@media (max-width: 767.98px) {
    [data-bs-theme="sabaody"] { --sb-fond: url('/assets/media/sabaody/fond-tel.webp?v=3'); }
}
/* Ordinateur : le décor commence à droite du menu latéral */
@media (min-width: 992px) {
    [data-bs-theme="sabaody"]::before { left: var(--bs-app-sidebar-width, 265px); }
}
/* Connexion et inscription : pas de menu latéral (le body porte alors la classe app-blank), le décor prend toute la largeur. */
[data-bs-theme="sabaody"]:has(body.app-blank)::before { left: 0; }

[data-bs-theme="sabaody"] body { background: transparent !important; }

/* ── Bulles de savon (calque posé par front/src/lib/sabaody.js, devant le fond, derrière le contenu) ──
   Trois éléments par bulle, pour n'animer que des transformations (composées par la carte graphique, sans redessin) :
   <i> monte, <b> se balance, <u> porte le dessin de la bulle (et l'éclatement). La taille est la taille de police : tout le dessin est en em. */
#sb-bulles { display: none; }
[data-bs-theme="sabaody"] #sb-bulles { display: block; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
@media (min-width: 992px) {
    [data-bs-theme="sabaody"] #sb-bulles { left: var(--bs-app-sidebar-width, 265px); }
}
[data-bs-theme="sabaody"]:has(body.app-blank) #sb-bulles { left: 0; }

#sb-bulles i {
    position: absolute; left: var(--x, 50%); top: 100%; width: 1em; height: 1em; font-size: var(--s, 60px); opacity: 0;
    will-change: transform, opacity;
    animation: sb-monte var(--t, 28s) linear var(--d, 0s) 1 both;
}
#sb-bulles b {
    position: absolute; inset: 0; will-change: transform;
    animation: sb-balance var(--f, 7s) ease-in-out var(--d, 0s) infinite alternate;
}
/* La bulle, comme dans l'animé : presque transparente, laiteuse vers le bord, un liseré blanc, deux éclats de lumière */
#sb-bulles u {
    position: absolute; inset: 0; border-radius: 50%; text-decoration: none;
    background:
        radial-gradient(circle at 30% 25%, #fff 0, rgba(255, 255, 255, .92) 2.4%, rgba(255, 255, 255, .22) 6.5%, transparent 11%),
        radial-gradient(ellipse 27% 11% at 38% 18%, rgba(255, 255, 255, .5), transparent 72%),
        radial-gradient(circle at 72% 78%, rgba(255, 255, 255, .7) 0, rgba(255, 255, 255, .16) 3%, transparent 7%),
        radial-gradient(circle closest-side, rgba(255, 255, 255, .02) 0, rgba(255, 255, 255, .04) 60%, rgba(235, 255, 250, .12) 84%, rgba(255, 255, 255, .3) 95.5%, rgba(255, 255, 255, .78) 98.4%, rgba(255, 255, 255, 0) 100%);
    box-shadow: 0 0 .12em rgba(200, 255, 245, .14);
}
/* L'irisation : des bandes arc-en-ciel qui suivent le bord (bleu, vert, or, rose), visibles en deux croissants, en bas à gauche et à droite */
#sb-bulles u::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle closest-side, transparent 74%, rgba(130, 210, 255, .62) 81%, rgba(150, 255, 185, .66) 86%, rgba(255, 240, 150, .66) 90.5%, rgba(255, 150, 210, .62) 94.5%, transparent 98%);
    -webkit-mask-image: conic-gradient(from 0deg, transparent 78deg, #000 108deg, #000 146deg, transparent 180deg, transparent 198deg, #000 228deg, #000 276deg, transparent 308deg);
    mask-image: conic-gradient(from 0deg, transparent 78deg, #000 108deg, #000 146deg, transparent 180deg, transparent 198deg, #000 228deg, #000 276deg, transparent 308deg);
}
/* Éclatement : la bulle se dilate et s'efface, un anneau de gouttelettes s'élargit */
#sb-bulles i.eclate u { animation: sb-eclate .26s ease-out forwards; }
#sb-bulles i.eclate b::after {
    content: ''; position: absolute; inset: 4%; border-radius: 50%; pointer-events: none;
    border: .025em dotted rgba(255, 255, 255, .85);
    animation: sb-gouttes .5s ease-out forwards;
}
@keyframes sb-monte {
    0% { transform: translate3d(0, 0, 0); opacity: 0; }
    7% { opacity: var(--o, .9); }
    86% { opacity: var(--o, .9); }
    100% { transform: translate3d(0, calc(-100vh - 1.4em), 0); opacity: 0; }
}
@keyframes sb-balance {
    0% { transform: translate3d(calc(var(--dx, 30px) * -1), 0, 0) rotate(-5deg) scale(1.02, .98); }
    50% { transform: translate3d(0, 0, 0) rotate(0deg) scale(.985, 1.015); }
    100% { transform: translate3d(var(--dx, 30px), 0, 0) rotate(5deg) scale(1.02, .98); }
}
@keyframes sb-eclate { to { transform: scale(1.32); opacity: 0; } }
@keyframes sb-gouttes { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

/* Mouvement réduit demandé par l'appareil : quelques bulles immobiles, sans animation */
@media (prefers-reduced-motion: reduce) {
    #sb-bulles i { animation: none; opacity: var(--o, .9); top: var(--y, 50%); }
    #sb-bulles b { animation: none; }
}

/* ── Titres de cartes : blanc menthe, lueur douce ── */
[data-bs-theme="sabaody"] .card-header h1, [data-bs-theme="sabaody"] .card-header h2, [data-bs-theme="sabaody"] .card-header h3, [data-bs-theme="sabaody"] .card-header .card-label, [data-bs-theme="sabaody"] .card .card-header .card-title, [data-bs-theme="sabaody"] .card .card-header .card-title .card-label {
    color: #f1fffb;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 0 16px rgba(111, 231, 205, .28);
}

/* ── En-tête : verre lagon, liseré nacré en dessous. Pas d'overflow caché : les menus déroulants et le panneau du profil sont des enfants de l'en-tête. ── */
[data-bs-theme="sabaody"] #kt_app_header {
    background:
        radial-gradient(circle at calc(100% - 352px) calc(50% - 5px), rgba(255, 255, 255, .85) 0, rgba(255, 255, 255, .85) 1.2px, transparent 2.4px),
        radial-gradient(circle at calc(100% - 347px) 50%, rgba(255, 255, 255, .03) 8.5px, rgba(150, 255, 190, .22) 10.5px, rgba(255, 255, 255, .5) 12.2px, transparent 13.2px),
        radial-gradient(circle at calc(100% - 386px) 70%, rgba(255, 255, 255, .03) 3px, rgba(255, 170, 220, .26) 4.4px, rgba(255, 255, 255, .46) 5.4px, transparent 6.4px),
        radial-gradient(circle at calc(100% - 318px) 26%, transparent 1.5px, rgba(255, 255, 255, .42) 2.6px, transparent 3.6px),
        radial-gradient(circle at calc(100% - 414px) 36%, transparent 1px, rgba(255, 255, 255, .36) 2px, transparent 3px),
        rgba(4, 30, 37, .84) !important;
    border-bottom: 1px solid transparent;
    border-image: var(--sb-film) 1;
    box-shadow: 0 .3rem 1.2rem rgba(0, 0, 0, .32);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
/* Téléphone : pas de bulles dessinées dans l'en-tête (elles passeraient sous le logo), ni de flou (recalculé à chaque bulle qui passe derrière) */
@media (max-width: 991.98px) {
    [data-bs-theme="sabaody"] #kt_app_header { background: rgba(5, 34, 42, .94) !important; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Logo de l'ordinateur : Rayleigh en pied dépasse le texte ; la barre du logo est un peu plus haute (100 px au lieu de 75)
   et ses marges plus étroites, pour qu'il s'affiche plus grand. Ne touche pas au menu réduit. */
@media (min-width: 992px) {
    [data-bs-theme="sabaody"] #kt_app_sidebar_logo { height: 100px; padding-left: 1rem !important; padding-right: 1rem !important; }
    [data-bs-theme="sabaody"] #kt_app_sidebar_logo img.app-sidebar-logo-default { height: 80px !important; }
}

/* Logo du téléphone (Rayleigh et le « O », sans « PRPG ») : largeur bornée pour laisser la place aux icônes de l'en-tête sur un petit écran */
[data-bs-theme="sabaody"] #kt_app_header img[src*="sabaody-small"] { height: auto !important; width: 72px; max-width: 22vw; }

/* ── Menu latéral : une autre vue que le décor de la page (le tronc du bosquet 44, ses racines, le lagon au pied),
   sous un voile lagon dense en haut, plus léger en bas où l'eau se voit ; liseré nacré à droite ── */
[data-bs-theme="sabaody"] #kt_app_sidebar {
    background:
        linear-gradient(180deg, rgba(4, 27, 34, .95) 0%, rgba(4, 29, 36, .91) 55%, rgba(4, 32, 39, .78) 100%),
        var(--sb-menu) center bottom / cover no-repeat #05202a !important;
    border-right: 1px solid transparent;
    border-image: linear-gradient(180deg, rgba(255, 155, 210, .55), rgba(99, 210, 255, .5) 30%, rgba(111, 231, 205, .55) 60%, rgba(255, 233, 168, .4) 82%, rgba(185, 165, 255, .5)) 1;
}
/* Page où l'on est : un verre menthe et l'icône en menthe */
[data-bs-theme="sabaody"] #kt_app_sidebar .menu-link.router-link-active {
    background: linear-gradient(95deg, rgba(20, 179, 152, .34), rgba(21, 147, 166, .16));
    box-shadow: inset 0 0 0 1px rgba(111, 231, 205, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
}
[data-bs-theme="sabaody"] #kt_app_sidebar .menu-link.router-link-active .menu-title { color: #fff; }
[data-bs-theme="sabaody"] #kt_app_sidebar .menu-link.router-link-active .menu-icon i,
[data-bs-theme="sabaody"] #kt_app_sidebar .menu-link.router-link-active .menu-icon svg { color: var(--sb-menthe); }
/* Élément actif du menu (état Metronic) : une goutte de lagon, menthe vers aqua */
[data-bs-theme="sabaody"] #kt_app_sidebar .menu-link.active {
    background: linear-gradient(95deg, #14b398, #1593a6) !important;
    box-shadow: 0 .3rem .9rem rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .28);
}
[data-bs-theme="sabaody"] #kt_app_sidebar .menu-link.active .menu-title,
[data-bs-theme="sabaody"] #kt_app_sidebar .menu-link.active .menu-icon i,
[data-bs-theme="sabaody"] #kt_app_sidebar .menu-link.active .menu-icon svg { color: #fff !important; }

/* ── Cartes : verre lagon, coins doux, liseré nacré (le film d'une bulle) ── */
[data-bs-theme="sabaody"] .card {
    --bs-card-bg: #0b3d47;
    position: relative;
    border: 1px solid transparent; border-radius: 14px;
    background:
        radial-gradient(ellipse 70% 42% at 12% 0%, rgba(190, 255, 240, .07), transparent 70%) padding-box,
        linear-gradient(180deg, rgba(12, 64, 75, .87), rgba(6, 42, 51, .92)) padding-box,
        var(--sb-film) border-box !important;
    box-shadow: 0 .8rem 1.9rem rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 255, 255, .08);
}
/* Cartes dans une carte (cases à choisir, encadrés) : plus sombres, liseré discret, pour que seule la grande carte porte le reflet */
[data-bs-theme="sabaody"] .card .card {
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(6, 40, 49, .9), rgba(4, 31, 39, .92)) padding-box,
        var(--sb-film-doux) border-box !important;
    box-shadow: none;
}
/* Cartes cliquables (attaques, cibles, objets du sac…) : un survol et une sélection qui tranchent nettement avec les autres cartes.
   Survol : le verre s'éclaircit en bleu-vert, anneau menthe, la carte se soulève. Sélection (classe border-primary) : la carte se remplit
   de menthe vif, anneau blanc, et une coche apparaît dans le coin. Clic : la carte s'enfonce. */
[data-bs-theme="sabaody"] .card.border-hover-primary { transition: transform .12s, box-shadow .12s; }
[data-bs-theme="sabaody"] .card.border-hover-primary:hover, [data-bs-theme="sabaody"] .card .card.border-hover-primary:hover {
    background: linear-gradient(180deg, rgba(31, 128, 132, .97), rgba(16, 92, 100, .97)) padding-box, linear-gradient(120deg, #6fe7cd, #63d2ff) border-box !important;
    border-color: transparent !important;
    box-shadow: 0 0 0 2px var(--sb-menthe), 0 .6rem 1.4rem rgba(0, 0, 0, .4) !important;
    transform: translateY(-2px);
}
[data-bs-theme="sabaody"] .card.border-primary, [data-bs-theme="sabaody"] .card .card.border-primary {
    background: linear-gradient(180deg, #24c4a6, #0f9488) padding-box, linear-gradient(120deg, #fff, #c8fff2) border-box !important;
    border-color: transparent !important;
    box-shadow: 0 0 0 3px #eafffa, 0 0 1.2rem rgba(111, 231, 205, .55) !important;
}
[data-bs-theme="sabaody"] .card.border-primary :is(.text-dark, .text-gray-400, .text-gray-600, .text-gray-700, .text-gray-800) { color: #fff !important; }
[data-bs-theme="sabaody"] .card.border-primary::after {
    content: '✓'; position: absolute; top: 6px; right: 8px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font: 700 13px/1 Inter, sans-serif;
    background: #fff; color: #0f8a7e; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); pointer-events: none;
}
[data-bs-theme="sabaody"] .card.border-hover-primary:active { transform: translateY(1px) scale(.98); }
[data-bs-theme="sabaody"] .card .card-header { border-bottom-color: rgba(111, 231, 205, .16); }
[data-bs-theme="sabaody"] .card .card-footer { border-top-color: rgba(111, 231, 205, .16); }

/* ── Connexion et inscription : la clairière se voit en entier ; le panneau du formulaire est en verre lagon, liseré nacré,
   et le texte posé sur le décor (à gauche) garde une ombre pour rester lisible ── */
[data-bs-theme="sabaody"] body.app-blank #kt_app_root .bg-body.rounded-4 {
    border: 1px solid transparent;
    background: linear-gradient(180deg, rgba(10, 56, 66, .88), rgba(5, 36, 44, .93)) padding-box, var(--sb-film) border-box !important;
    box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
}
[data-bs-theme="sabaody"] body.app-blank #kt_app_root .flex-lg-row-fluid { text-shadow: 0 1px 2px rgba(0, 20, 26, .9), 0 0 14px rgba(0, 20, 26, .65); }

/* ── Boutons ── */
[data-bs-theme="sabaody"] .btn { border-radius: 10px; }
[data-bs-theme="sabaody"] .btn.btn-icon { border-radius: 10px; }
/* Principal : lagon brillant, menthe vers aqua */
[data-bs-theme="sabaody"] .btn.btn-primary {
    border: 1px solid rgba(255, 255, 255, .2); color: #fff;
    background: linear-gradient(180deg, #25cdab, #0f9d8f 58%, #0d8794);
    box-shadow: 0 .25rem .7rem rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .45);
    text-shadow: 0 1px 1px rgba(0, 55, 60, .55);
}
[data-bs-theme="sabaody"] .btn.btn-primary:hover, [data-bs-theme="sabaody"] .btn.btn-primary:focus {
    color: #fff; background: linear-gradient(180deg, #33ddba, #13ad9e 58%, #0f97a5);
}
[data-bs-theme="sabaody"] .btn.btn-primary:active { transform: translateY(1px); }
/* Sombre (le bouton courant des pages d'île) : verre menthe */
[data-bs-theme="sabaody"] .btn.btn-dark {
    color: #eafffa; border: 1px solid rgba(111, 231, 205, .42);
    background: linear-gradient(180deg, rgba(111, 231, 205, .2), rgba(111, 231, 205, .1));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
[data-bs-theme="sabaody"] .btn.btn-dark:hover, [data-bs-theme="sabaody"] .btn.btn-dark:focus {
    color: #fff; border-color: rgba(111, 231, 205, .75);
    background: linear-gradient(180deg, rgba(111, 231, 205, .34), rgba(111, 231, 205, .18));
}
/* Metronic pose en !important un fond --bs-dark-active (blanc ici) au survol, au focus et à l'activation : on garde le verre menthe */
[data-bs-theme="sabaody"] .btn.btn-dark:hover:not(.btn-active), [data-bs-theme="sabaody"] .btn.btn-dark:focus:not(.btn-active),
[data-bs-theme="sabaody"] .btn.btn-dark:active:not(.btn-active), [data-bs-theme="sabaody"] .btn.btn-dark.active, [data-bs-theme="sabaody"] .btn.btn-dark.show,
[data-bs-theme="sabaody"] .show > .btn.btn-dark, [data-bs-theme="sabaody"] .btn-check:checked + .btn.btn-dark { background-color: transparent !important; color: #fff !important; }
[data-bs-theme="sabaody"] .btn.btn-dark:hover:not(.btn-active) i, [data-bs-theme="sabaody"] .btn.btn-dark:hover:not(.btn-active) .svg-icon,
[data-bs-theme="sabaody"] .btn.btn-dark:focus:not(.btn-active) i, [data-bs-theme="sabaody"] .btn.btn-dark:focus:not(.btn-active) .svg-icon { color: #fff !important; }
[data-bs-theme="sabaody"] .btn.btn-dark:active { transform: translateY(1px); }
[data-bs-theme="sabaody"] .btn.btn-dark:disabled, [data-bs-theme="sabaody"] .btn.btn-dark.disabled { color: #9fcfcb; border-color: rgba(111, 231, 205, .2); }

/* ── Champs : lagon profond, liseré menthe à la saisie ── */
[data-bs-theme="sabaody"] .form-control, [data-bs-theme="sabaody"] .form-select {
    background-color: rgba(3, 23, 29, .72); border: 1px solid rgba(111, 231, 205, .26); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .4);
    border-radius: 10px;
}
[data-bs-theme="sabaody"] .form-control:focus, [data-bs-theme="sabaody"] .form-select:focus { border-color: var(--sb-menthe); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .4), 0 0 0 3px rgba(111, 231, 205, .12); }
[data-bs-theme="sabaody"] .form-control.form-control-flush { background-color: transparent; border-color: transparent; box-shadow: none; }
[data-bs-theme="sabaody"] .form-label { color: #d5f7f0; font-weight: 700; }

/* ── Liens ── */
[data-bs-theme="sabaody"] a:not(.btn):not(.menu-link):not(.nav-link) { color: #6fe7cd; }
[data-bs-theme="sabaody"] a:not(.btn):not(.menu-link):not(.nav-link):hover { color: #a5f5e3; }

/* ── Barres de progression : coins ronds, reflet de bulle ── */
[data-bs-theme="sabaody"] .progress { border-radius: 999px; background-color: rgba(3, 23, 29, .7); }
[data-bs-theme="sabaody"] .progress-bar { border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }

/* ── Fenêtres et menus qui s'ouvrent par-dessus la page : même verre, même liseré nacré ── */
[data-bs-theme="sabaody"] .swal2-popup, [data-bs-theme="sabaody"] .modal-content {
    border: 1px solid transparent; border-radius: 14px;
    background: linear-gradient(180deg, #0d4450, #072c35) padding-box, var(--sb-film) border-box;
    box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .5);
}
[data-bs-theme="sabaody"] .swal2-popup .swal2-title { color: #f1fffb; }
[data-bs-theme="sabaody"] .swal2-popup .swal2-html-container { color: #c2e6e2; }
[data-bs-theme="sabaody"] .dropdown-menu, [data-bs-theme="sabaody"] .menu-sub-dropdown, [data-bs-theme="sabaody"] .select2-dropdown {
    border: 1px solid rgba(111, 231, 205, .22); border-radius: 12px;
}
[data-bs-theme="sabaody"] .select2-container--bootstrap5 .select2-selection { border-radius: 10px; }

/* ── Notifications (toasts) : coins doux ── */
[data-bs-theme="sabaody"] .Vue-Toastification__toast { border-radius: 12px; }

/* ── Barre du bas sur téléphone (vie, endurance, raccourcis) : verre lagon, liseré nacré au-dessus, boutons en verre menthe ── */
[data-bs-theme="sabaody"] .mobile-quickbar {
    background: linear-gradient(180deg, rgba(8, 48, 58, .97), rgba(4, 30, 38, .98));
    border-top: 1px solid transparent; border-image: var(--sb-film) 1;
    box-shadow: 0 -.25rem .9rem rgba(0, 0, 0, .35);
}
[data-bs-theme="sabaody"] .mobile-quickbar-avatar > img:first-child { border: 1px solid rgba(111, 231, 205, .45); }
[data-bs-theme="sabaody"] .mobile-quickbar-bar .progress { background: rgba(3, 23, 29, .8); }
[data-bs-theme="sabaody"] .mobile-quickbar-bar span, [data-bs-theme="sabaody"] .mobile-quickbar-berry { color: #d5f7f0; }
[data-bs-theme="sabaody"] .mobile-quickbar-action {
    color: var(--sb-menthe); border: 1px solid rgba(111, 231, 205, .38);
    background: linear-gradient(180deg, rgba(111, 231, 205, .18), rgba(111, 231, 205, .08));
}
[data-bs-theme="sabaody"] .mobile-quickbar-action:hover, [data-bs-theme="sabaody"] .mobile-quickbar-action:active {
    color: #fff; background: linear-gradient(180deg, rgba(111, 231, 205, .32), rgba(111, 231, 205, .16));
}
