/****************************** COLORS ******************************/
:root {
    --main: #a855f7;            /* Violet néon propre */
    --main-hover: #9333ea;      /* Hover violet */
    --bg-dark: #1e1b2e;         /* Topbar violet foncé mais lisible */
    --sidebar-bg: #2a2342;      /* Sidebar violet doux */
    --workspace-bg: #f4f0ff;    /* Fond clair légèrement violet */
    --card-bg: #ffffff;         /* Cartes (inchangé) */
}

/****************************** RESET ******************************/
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--workspace-bg);
}

/****************************** TOPBAR ******************************/
.topbar {
    height: 60px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: white;
    border-bottom: 3px solid var(--main);
}

/****************************** LOGOS SITES ******************************/
.logo-switcher {
    display: flex;
    gap: 15px;
    align-items: center;
}

.logo {
    height: 60px;
    width: auto;
    min-width: 50px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.1);
}

.logo.active {
    border-color: var(--main);
}

/****************************** MENU TOP ******************************/
.top-menu {
    display: flex;
    gap: 15px;
}
.top-menu a {
    color: #94a3b8;
    text-decoration: none;
}
.top-menu a:hover {
    color: white;
}

/****************************** LAYOUT ******************************/
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/****************************** SIDEBAR ******************************/
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
}
.sidebar-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 20px;
    font-weight: bold;
    border-bottom: 1px solid #2f3640;
}
.sidebar-slug {
    font-size: 15px;
    font-weight: normal;
    color: var(--main);       
    text-transform: lowercase;
    opacity: 0.7;
}
.menu a {
    display: block;
    padding: 12px 20px;
    color: #a4b0be;
    text-decoration: none;
    border-left: 4px solid transparent;
}
.menu a:hover {
    background: #2f3542;
    color: white;
    border-left-color: var(--main);
}

/****************************** WORKSPACE ******************************/
.workspace {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/****************************** CARTES GÉNÉRIQUES ******************************/
/* Pour l'admin et les blocs standards */
.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border-top: 5px solid var(--main);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/****************************** MODULE ARTICLES (Front) ******************************/
.art-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border-top: 5px solid var(--main);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.art-title {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid var(--main); /* On utilise la variable bleue */
    padding-bottom: 10px;
}
.art-body {
    line-height: 1.7;
    color: #34495e;
    margin-top: 15px;
}

/****************************** CLOCK ******************************/
#clock {
    font-size: 0.85rem;
    color: var(--main); /* Ou la couleur que tu veux pour ton texte horloge */
    text-align: right;
}

/***************************** NEWS FRONT (Système Modale) *****************************/
.n-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}
.n-card {
    display: flex !important;
    background: white;
    border-radius: 8px;
    height: 110px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: 0.3s;
    border: 1px solid #eee;
}
.n-card:hover { transform: translateY(-3px); border-color: var(--main); }
.n-img {
    width: 160px !important;
    height: 100% !important;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.n-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.n-info h3 { margin: 0; font-size: 16px; color: var(--bg-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-info p { margin-top: 5px; font-size: 13px; color: #666; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.n-modal-overlay {
    display: none;
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    justify-content: center; 
    align-items: center;
}
.n-modal-content {
    background: white;
    width: 90%; max-width: 800px;
    border-radius: 12px;
    position: relative;
    max-height: 90vh; 
    overflow-y: auto;
}
.n-close { position: absolute; right: 15px; top: 10px; font-size: 25px; cursor: pointer; color: #999; z-index: 10; }
.n-view-header { display: flex; align-items: center; gap: 15px; padding: 20px; border-bottom: 1px solid #eee; }
.n-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.n-view-img-container {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    justify-content: center;
}
.n-view-img { max-width: 100%; height: auto; object-fit: contain; }
.n-view-content { padding: 20px; line-height: 1.6; font-size: 15px; color: #333; }










/***************************** ADMINISTRATION GENERALE *****************************/
.adm-dashboard { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
    gap: 15px; 
    margin-bottom: 30px; 
}

.adm-vignette {
    background: var(--sidebar-bg); 
    color: inherit;
    height: 110px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    border-radius: 12px; 
    text-decoration: none;
    transition: 0.3s; 
    border: 2px solid transparent;
}

.adm-vignette:hover { 
    background: var(--bg-dark); 
    color: #fff; 
    transform: translateY(-3px); 
}

.adm-vignette.active { 
    border-color: var(--main); 
    background: var(--bg-dark); 
    color: #fff; 
}

.adm-vignette-icon { font-size: 30px; margin-bottom: 8px; }
.adm-vignette-label { font-size: 11px; font-weight: bold; text-transform: uppercase; }

.adm-module-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border-top: 5px solid var(--main);
    min-height: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* FORMULAIRES */
.adm-form { 
    background: var(--workspace-bg); 
    padding: 20px; 
    border-radius: 8px; 
    margin-bottom: 25px; 
}

.adm-form label { 
    display: block; 
    font-size: 11px; 
    font-weight: bold; 
    color: inherit; 
    text-transform: uppercase; 
    margin-bottom: 5px; 
    opacity: 0.8; 
}

/* CORRECTION ICI : On exclut les radios du toggle du width 100% */
.adm-form input:not([type="radio"]), .adm-form select, .adm-form textarea {
    width: 100%; 
    padding: 10px; 
    margin-bottom: 15px;
    border: 1px solid var(--adm-border, #cbd5e1); 
    border-radius: 6px; 
    background: var(--card-bg, #fff);
    color: inherit;
}

/* TOGGLE */
.adm-toggle { 
    display: flex; 
    height: 38px; 
    border: 1px solid var(--adm-border, #cbd5e1); 
    border-radius: 6px; 
    overflow: hidden; 
    background: var(--card-bg, #fff); /* Assure un fond propre */
}

.adm-toggle input { display: none !important; }

.adm-toggle-btn {
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    font-size: 11px; 
    font-weight: bold; 
    transition: 0.2s;
    opacity: 0.6;
    margin: 0; /* Anti-bug */
}

.adm-toggle input:checked + .adm-toggle-btn { 
    background: var(--main); 
    color: #fff; 
    opacity: 1;
}

.adm-row { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 15px; }

.adm-btn-main { 
    background: var(--main); 
    color: #fff; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.2s; 
}











/***************************** BBCODE TOOLBAR (Articles & News) *****************************/
.bbcode-toolbar { 
    background: #2d3436; 
    padding: 5px; 
    display: flex; 
    gap: 5px; 
    border-radius: 4px 4px 0 0;
}
.btn-tool { 
    background: #444; 
    color: #fff; 
    border: none; 
    padding: 3px 10px; 
    cursor: pointer; 
    border-radius: 3px; 
}
.btn-tool:hover { background: var(--main); }
.input-textarea { 
    width: 100%; 
    border: 1px solid #ddd; 
    padding: 15px; 
    outline: none; 
    resize: vertical; 
    border-radius: 0 0 4px 4px;
    min-height: 300px;
}

/****************************** LOGIN & REGISTER ******************************/
body.login-page {
    background: var(--bg-dark) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    width: 100vw !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border-top: 5px solid var(--main);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/****************************** UPDATES ******************************/
.update-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.update-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
}