/**
 * Modern Navigation CSS - FluxCP-NG
 * Design moderne 2025 pour submenu et pagination
 */

/* ============================================
   SUBMENU - THÈME RÉTRO
   ============================================ */

#submenu {
    background: linear-gradient(to bottom, #a8cef0, #8ebceb);
    padding: 16px 24px;
    border-radius: 8px;
    margin: 20px 0 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid #6a9dd4;
    font-size: 0; /* Remove whitespace between inline elements */
}

/* Suppression de l'emoji épingle */
#submenu::before {
    content: '';
    display: none;
}

.sub-menu-item {
    display: inline-block;
    padding: 10px 20px;
    margin: 4px 6px;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #6a9dd4;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sub-menu-item:hover {
    background: linear-gradient(to bottom, #ffed4e, #d4af37);
    border-color: #b8860b;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sub-menu-item.current-sub-menu {
    background: linear-gradient(to bottom, #ffd700, #d4af37);
    color: #2c3e50;
    border-color: #b8860b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sub-menu-item.current-sub-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* ============================================
   PAGINATION
   ============================================ */

.pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-num,
.page-prev,
.page-next,
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-num:hover,
.page-prev:hover,
.page-next:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.current-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: #667eea !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    cursor: default;
    pointer-events: none;
}

.page-ellipsis {
    background: transparent;
    border: none;
    color: #95a5a6;
    cursor: default;
    pointer-events: none;
}

/* Navigation arrows */
.page-prev,
.page-next {
    font-weight: 700;
    padding: 0 16px;
}

/* Page jump input */
.pages label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.pages input[type="text"] {
    width: 60px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.pages input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ============================================
   SEARCH FORM TOGGLE
   ============================================ */

.toggler {
    margin: 20px 0;
}

.toggler a {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.toggler a::before {
    content: '🔍 ';
}

.toggler a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17, 153, 142, 0.4);
}

/* ============================================
   SEARCH FORM
   ============================================ */

.search-form {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    margin: 20px 0;
    border: 2px solid #e0e0e0;
}

.search-form p {
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.search-form label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.search-form input[type="text"],
.search-form input[type="number"],
.search-form select {
    padding: 10px 14px;
    font-size: 14px;
    color: #333;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.search-form input[type="text"]:focus,
.search-form input[type="number"]:focus,
.search-form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-form input[type="submit"],
.search-form button[type="submit"] {
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-form input[type="submit"]:hover,
.search-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* ============================================
   TABLEAUX MODERNES
   ============================================ */

/* Table générique moderne */
.generic-table,
.horizontal-table,
.vertical-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.generic-table thead,
.horizontal-table thead,
.vertical-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.generic-table thead th,
.horizontal-table thead th,
.vertical-table thead th {
    padding: 16px 12px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.generic-table thead th a,
.horizontal-table thead th a,
.vertical-table thead th a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.generic-table thead th a:hover,
.horizontal-table thead th a:hover,
.vertical-table thead th a:hover {
    opacity: 0.9;
}

.generic-table tbody tr,
.horizontal-table tbody tr,
.vertical-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.generic-table tbody tr:hover,
.horizontal-table tbody tr:hover,
.vertical-table tbody tr:hover {
    background: #f8f9fa;
}

.generic-table tbody td,
.horizontal-table tbody td,
.vertical-table tbody td {
    padding: 14px 12px;
    font-size: 14px;
    color: #555;
}

.generic-table tbody tr:last-child,
.horizontal-table tbody tr:last-child,
.vertical-table tbody tr:last-child {
    border-bottom: none;
}

/* Alternating rows */
.generic-table tbody tr:nth-child(even),
.horizontal-table tbody tr:nth-child(even),
.vertical-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.generic-table tbody tr:nth-child(even):hover,
.horizontal-table tbody tr:nth-child(even):hover,
.vertical-table tbody tr:nth-child(even):hover {
    background: #f8f9fa;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    #submenu {
        padding: 12px 16px;
        text-align: center;
    }

    .sub-menu-item {
        margin: 4px 3px;
        padding: 8px 16px;
        font-size: 13px;
    }

    .pages {
        gap: 4px;
    }

    .page-num,
    .page-prev,
    .page-next {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }

    .pages label {
        margin-left: 8px;
        font-size: 13px;
    }

    .pages input[type="text"] {
        width: 50px;
        padding: 6px 8px;
        font-size: 13px;
    }

    .search-form {
        padding: 16px;
    }

    .search-form p {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form label {
        min-width: auto;
    }

    .generic-table {
        font-size: 13px;
    }

    .generic-table thead th {
        padding: 12px 8px;
        font-size: 12px;
    }

    .generic-table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

