/* ===============================
   VARIABLES THÈME (DARK PAR DÉFAUT)
================================= */

:root {
    --bg-main: #282828;
    --bg-card: rgba(40, 40, 40, 0.92);
    --input-bg: rgba(255,255,255,0.06);
    --input-border: rgba(255,255,255,0.08);
    --text-main: #ffffff;
    --text-placeholder: rgba(255,255,255,0.5);

    --accent-start: #3a3a3a;
    --accent-end: #1f1f1f;
    --accent-border: rgba(255,255,255,0.15);
    --shadow-glow: rgba(0,0,0,0.3);

    --bg-image: url("https://aurel-tech.com/wp-content/uploads/2026/03/image.webp");
    --overlay-color: rgba(5,15,35,0);

    --topbar-bg: rgba(40, 40, 40, 0.98);
    --tabs-bg: rgba(33, 33, 33, 0.98);
    --panel-bg: rgba(40, 40, 40, 0.85);
    --border-soft: rgba(255,255,255,0.08);
}

/* ===============================
   MODE CLAIR
================================= */

body.light-mode {
    --bg-main: #f3f6fb;
    --bg-card: rgba(255,255,255,0.92);
    --input-bg: rgba(0,0,0,0.04);
    --input-border: rgba(0,0,0,0.08);
    --text-main: #0b1425;
    --text-placeholder: rgba(0,0,0,0.4);

    --accent-start: #2563eb;
    --accent-end: #3b82f6;
    --accent-border: rgba(0,0,0,0.2);
    --shadow-glow: rgba(37,99,235,0.25);

    --bg-image: url("https://aurel-tech.com/wp-content/uploads/2026/03/image.webp");
    --overlay-color: rgba(255,255,255,0);

    --topbar-bg: rgba(255,255,255,0.98);
    --tabs-bg: rgba(245,247,251,0.98);
    --panel-bg: rgba(255,255,255,0.9);
    --border-soft: rgba(0,0,0,0.08);
}

/* ===============================
   RESET
================================= */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===============================
   PAGE LOGIN
================================= */

.mc-login-page {
    min-height: 100vh;
}

.mc-login-bg {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;

    flex-direction: column; /* 🔥 AJOUT IMPORTANT */

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

    padding: 110px 20px 40px;

    background:
        linear-gradient(var(--overlay-color), var(--overlay-color)),
        var(--bg-image);

    background-size: cover;
    background-position: center;
    transition: background 0.4s ease;
}

/* ===============================
   CARD LOGIN
================================= */

.mc-login-card {
    position: relative;
    z-index: 2;
    width: 350px;
    max-width: 90%;
    padding: 50px;
    margin-top: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    border: 1px solid var(--accent-border);
    text-align: center;
    transition: all 0.3s ease;
}

.mc-login-card h1 {
    color: var(--text-main);
    margin-bottom: 40px;
    font-size: 30px;
    letter-spacing: 2px;
}

/* ===============================
   INPUTS LOGIN
================================= */

.mc-login-card input {
    width: 100%;
    padding: 10px;
    margin-bottom: 16px;
    border-radius: 20px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 14px;
    transition: 0.3s;
}

.mc-login-card input::placeholder {
    color: var(--text-placeholder);
}

.mc-login-card input:focus {
    outline: none;
    border: 1px solid var(--accent-start);
    box-shadow: 0 0 12px var(--shadow-glow);
}

/* ===============================
   BOUTON LOGIN
================================= */

.mc-login-card button,
.mc-btn {
    width: 67%;
    padding: 8px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(90deg,var(--accent-start),var(--accent-end));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.mc-login-card button:hover,
.mc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow-glow);
}

/* ===============================
   TOP BAR
================================= */

.mc-topbar {
    width: 100%;
    padding: 4px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    backdrop-filter: blur(14px);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-soft);
}

.mc-topbar-left,
.mc-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-topbar-left {
    min-width: 0;
}

.mc-topbar-right {
    flex-shrink: 0;
}

.mc-logo {
    width: 140px;
    height: auto;
    object-fit: contain;
    display: block;
}

.mc-brand {
    color: var(--text-main);
    font-size: 35px;
    font-weight: 600;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.mc-company-separator {
    color: var(--text-placeholder);
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
}

.mc-company-title {
    color: var(--text-main);
    font-size: 30px;
    font-weight: 500;
    white-space: nowrap;
}

.mc-datetime {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
}

/* ===============================
   BOUTON THÈME
================================= */

.theme-btn {
    position: static;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    border: 1px solid var(--accent-border);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px var(--shadow-glow);
}

/* ===============================
   LOGIN SPÉCIFIQUE
================================= */

.mc-login-page .mc-topbar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
}

.mc-login-page .mc-company-name {
    position: absolute;
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: none;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 14px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.mc-login-page .mc-company-name.is-visible {
    display: block;
}

.mc-login-page .mc-company-preview {
    display: none;
    width: 100%;
    height: 90px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.mc-login-page .mc-company-preview.is-visible {
    display: flex;
}

.mc-login-page .mc-company-preview img {
    max-width: 120px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

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

.mc-dashboard-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
}

.mc-dashboard-page .mc-topbar {
    position: relative;
    top: auto;
    left: auto;
    z-index: 1;
}

.mc-tabs {
    display: flex;
    gap: 10px;
    padding: 14px 18px 0;
    background: var(--tabs-bg);
    border-bottom: 1px solid var(--border-soft);
    margin: 0;
    flex-wrap: wrap;
}

.mc-tab {
    padding: 12px 18px;
    border: 1px solid var(--border-soft);
    border-radius: 10px 10px 0 0;
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
    font-weight: 600;
}

.mc-tab:hover {
    background: rgba(255,255,255,0.12);
}

.mc-tab.active {
    background: linear-gradient(90deg,var(--accent-start),var(--accent-end));
    box-shadow: 0 0 20px rgba(0,120,255,0.35);
    border-color: transparent;
    color: #fff;
}

.mc-tab-panels {
    flex: 1;
    padding: 20px 18px 18px;
}

.mc-tab-panel {
    display: none;
}

.mc-tab-panel.active {
    display: block;
}

/* ===============================
   LAYOUT DES VUES
================================= */

.mc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    height: calc(100vh - 170px);
    align-items: stretch;
}

.mc-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    color: var(--text-main);
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.mc-main-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-soft);
}

.mc-main-header h2 {
    margin: 0;
    color: var(--text-main);
}

.mc-main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.mc-main-content p {
    margin: 0;
}

.mc-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mc-full-page {
    width: 100%;
}

/* ===============================
   CARTES
================================= */

.mc-card {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 20px;
    color: var(--text-main);
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    border: 1px solid var(--border-soft);
}

.mc-card h1,
.mc-card h2,
.mc-card h3 {
    margin-top: 0;
    color: var(--text-main);
}

.mc-card p {
    color: var(--text-main);
    opacity: 0.95;
}

/* ===============================
   BOUTONS APP
================================= */

.mc-btn-primary {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg,var(--accent-start),var(--accent-end));
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: 0.3s ease;
}

.mc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px var(--shadow-glow);
}

/* ===============================
   DEBUG
================================= */

.mc-debug-box {
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #ffb4b4;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ===============================
   MODE CLAIR COMPLÉMENT
================================= */

body.light-mode .mc-tab {
    background: rgba(0,0,0,0.06);
    color: #111;
}

body.light-mode .mc-tab:hover {
    background: rgba(0,0,0,0.09);
}

body.light-mode .mc-card {
    background: rgba(255,255,255,0.9);
    color: #111;
}

body.light-mode .mc-card h1,
body.light-mode .mc-card h2,
body.light-mode .mc-card h3,
body.light-mode .mc-card p {
    color: #111;
}

/* ===============================
   PRÉVISU ENTREPRISE
================================= */

.mc-company-preview {
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
}

.mc-company-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mc-company-logo-preview {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    padding: 8px;
    border: 1px solid var(--accent-border);
}

.mc-company-name {
    font-size: 13px;
    color: var(--text-placeholder);
    text-align: center;
}
/* ===============================
   erreur
================================= */

.mc-login-error {
    position: absolute; /* 🔥 clé */
    bottom: 20px;       /* sous la carte */
    
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 77, 77, 0.70);
    border: 1px solid rgba(255, 77, 77, 0.35);
    color: #000000;
    font-size: 14px;
    text-align: center;

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

    opacity: 1;
    transition: opacity 0.5s ease;
}

/* ===============================
   VERSION PLUGIN
================================= */

.mc-version {
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-placeholder);
    text-align: center;
    opacity: 0.7;
}

/*======================
   test parametre 
   =======================*/
.mc-settings-notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.mc-settings-notice-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.mc-settings-notice-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.mc-settings-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-settings-row input {
    width: 100%;
}

.mc-sites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mc-site-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
}










.mc-user-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
}

.mc-user-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mc-user-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.mc-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}





.mc-logout-btn::after {
    content: "Déconnexion";
    position: absolute;
    bottom: -28px;
    right: 0;
    background: #111;
    color: #fff;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(5px);
    transition: 0.2s;
    pointer-events: none;
}

.mc-logout-btn:hover::after {
    opacity: 1;
    transform: translateY(0);
}
/* ===============================
   RESPONSIVE
================================= */

@media (max-width: 900px) {
    .mc-brand {
        font-size: 24px;
    }

    .mc-company-title {
        font-size: 20px;
    }

    .mc-logo {
        width: 120px;
    }

    .mc-datetime {
        font-size: 13px;
        padding: 9px 12px;
    }

    .mc-main-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .mc-topbar {
        padding: 14px 16px;
        gap: 10px;
        align-items: flex-start;
        flex-direction: column;
    }

    .mc-topbar-left,
    .mc-topbar-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .mc-brand {
        font-size: 18px;
    }

    .mc-company-title {
        font-size: 16px;
    }

    .mc-company-separator {
        display: none;
    }

    .mc-datetime {
        font-size: 12px;
        padding: 8px 12px;
    }

    .mc-login-card {
        margin-top: 70px;
        padding: 35px 25px;
    }

    .mc-login-card h1 {
        font-size: 24px;
    }

    .mc-tabs {
        padding: 10px 16px 0;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        flex-wrap: nowrap;
    }

    .mc-tab {
        flex: 0 0 auto;
        padding: 11px 14px;
        font-size: 14px;
    }

    .mc-tab-panels {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .mc-login-card {
        width: 100%;
        max-width: 100%;
    }

    .mc-login-card button,
    .mc-btn {
        width: 100%;
    }

    .mc-logo {
        width: 100px;
    }
}
