/* ===== VARIABLES ===== */
:root {
    --bg-main: linear-gradient(180deg, #093E51 0%, #072f3d 100%);
    --bg-card: #ffffff;

    --text-light: #f7f7fb;
    --text-dark: #1f2937;

    --primary: #2563eb;
    --primary-hover: #1e40af;

    --secondary: #4b5563;
}

/* ===== GLOBAL ===== */
html, body {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: var(--bg-main);
    color: var(--text-light);

    display: flex;
    flex-direction: column;
}

.btn-icon {
    font-size: 14px; /* force taille identique */
}

.btn-icon * {
    font-size: 14px;
}
/* ===== CONTAINER ===== */
.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

/* ===== MOBILE MENU ===== */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 1000;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ===== ANIMATION PLUS FLUIDE ===== */
.mobile-menu {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== OMBRE PRO ===== */
.mobile-menu {
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
}

/* ===== HEADER MENU ===== */
.menu-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* ===== TOUCH FEEDBACK ===== */
.mobile-menu a:active {
    background: #e5e7eb;
}

.mobile-menu::before {
    content: "";
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 10px;
    margin: 10px auto;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: #fff;

    transform: translateX(100%);
    transition: 0.3s;

    z-index: 1001;

    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu a {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .burger {
        display: block;
    }

    .desktop-menu {
        display: none;
    }
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 40px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.nav-left h1 {
    font-size: 18px;
    margin: 0;
}

.nav-right {
    display: flex;
    align-items: center;
}

nav a {
    color: white;
    margin-left: 15px;
    text-decoration: none;
    font-size: 14px;
}

nav a:hover {
    text-decoration: underline;
}

/* ===== TITRES ===== */
h2 {
    text-align: center;
    margin: 20px 0;
    color: var(--text-light);
}

.card h2,
form h2 {
    color: var(--text-dark);
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow: visible;
}

.content-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: auto;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    background: #072f3d;
    padding: 20px;
    position: sticky;
    top: 60px;
}

.sidebar-link {
    margin-bottom: 15px;
}

.sidebar-link a {
    color: #38bdf8;
    text-decoration: none;
}

.sidebar-link a:hover {
    text-decoration: underline;
}

/* ===== CARD ===== */
.card {
    background: var(--bg-card);
    color: var(--text-dark);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

/* ===== ARTICLES ===== */
.articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.articles-full {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 1000px;
}

/* ===== ARTICLE FEATURED ===== */
.featured {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-left: 6px solid var(--primary);
}

/* ===== FORM ===== */
form {
    max-width: 700px;
    margin: 30px auto;
    background: var(--bg-card);
    color: var(--text-dark);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ===== INPUT ===== */
input, textarea, select {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

/* ===== ROW ===== */
.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* ===== TABLE ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    color: #333;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* ===== ALERT ===== */
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    padding: 10px;
    border-radius: 8px;
}

/* ===== PREVIEW ===== */
.preview-box {
    border: 1px solid #e5e7eb;
    padding: 15px;
    margin-top: 10px;
    background: white;
    border-radius: 10px;
    color: #111;
}

/* ===== FOOTER ===== */
.footer::before {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(to right, transparent, #38bdf8, transparent);
    margin-bottom: 10px;
}

.footer {
    background: rgba(7, 47, 61, 0.95);
    backdrop-filter: blur(6px);

    border-top: 1px solid rgba(255,255,255,0.1);

    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;
    gap: 15px;
}

/* TEXTE */
.footer-content p {
    margin: 0;
    font-size: 13px;
    color: #cbd5e1;
}

/* LIENS */
.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #38bdf8;
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s;
}

.footer-links a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}


/* ===== TINYMCE FIX ===== */
.tox .tox-edit-area__iframe {
    background: white !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

    .burger {
        display: block;
    }

    .nav-right {
        display: none;
    }

    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
    }

    nav.navbar {
        flex-direction: row; /* 🔥 FIX IMPORTANT */
    }
}

nav.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 1000;

    background: rgba(7, 47, 61, 0.95);
    backdrop-filter: blur(6px);

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 20px;
    height: 60px;

    border-bottom: 1px solid rgba(255,255,255,0.1);
}