@import url('themes/animations.css');

:root {
    --header-height: 60px;
    --navbar-height: 48px;
    --subnav-height: 52px;
    --header-navbar-total: calc(var(--header-height) + var(--navbar-height));
    --all-navs-total: calc(var(--header-height) + var(--navbar-height) + var(--subnav-height));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0d0d0d;
    color: #e8e8e8;
    font-size: 14px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 191, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(75, 0, 130, 0.03) 0%, transparent 100%);
    z-index: -1;
    pointer-events: none;
    animation: subtleShift 20s ease-in-out infinite alternate;
}

@keyframes subtleShift {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.header {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    height: var(--header-height);
    padding: 8px 16px;
    text-align: center;
    border-bottom: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.header h1 {
    font-size: 1.4em;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #b8b8b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    margin: 0;
}

.nav-tabs,
.sub-nav {
    position: fixed;
    left: 0;
    right: 0;
    background: rgba(16, 16, 16, 0.9);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.nav-tabs {
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(20px) saturate(150%);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: none;
    padding: 4px 0;
    gap: 0;
    position: fixed;
    min-height: var(--navbar-height);
    top: var(--header-height);
    z-index: 999;
    transition: all 0.3s ease;
}

.nav-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8a2be2, transparent);
    transform: translateX(-50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab:hover {
    color: #fff;
    background: rgba(138, 43, 226, 0.08);
}

.nav-tab:hover::before {
    width: 80%;
}

.nav-tab.active {
    color: #fff;
    background: rgba(138, 43, 226, 0.12);
}

.nav-tab.active::before {
    width: 100%;
    background: linear-gradient(90deg, #8a2be2, #00bfff);
}

.sub-nav {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(16px) saturate(160%);
    display: flex;
    padding: 8px 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 8px;
    top: var(--header-navbar-total);
    z-index: 998;
    min-height: var(--subnav-height);
    align-items: center;
}

.sub-nav-item {
    padding: 12px 22px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-width: 160px;
    text-align: left;
    position: relative;
}

.sub-nav-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #8a2be2, #00bfff);
    transition: width 0.3s ease;
}

.sub-nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.sub-nav-item:hover::after {
    width: 100%;
}

.sub-nav-item.active {
    color: #e0c3fc;
    background: rgba(138, 43, 226, 0.1);
}

.sub-nav-item.active::after {
    width: 100%;
}

.sub-nav-item .delete-rapport {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ff4757;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sub-nav-item:hover .delete-rapport {
    opacity: 1;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 32px;
    max-width: 1600px;
    margin: 0 auto;
    margin-top: var(--all-navs-total);
    transition: margin-top 0.3s ease;
}

/* Pour les pages sans sub-nav */
.main-container.no-subnav {
    margin-top: var(--header-navbar-total);
}

.left-panel,
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.card {
    background: rgba(22, 22, 22, 0.6);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.4), rgba(0, 191, 255, 0.4));
    border-radius: 20px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    filter: blur(10px);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 43, 226, 0.3);
    box-shadow: 0 16px 48px rgba(138, 43, 226, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.template-box {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #e5e5e5;
    position: relative;
    background: linear-gradient(135deg, rgba(15, 15, 16, 0.9) 0%, rgba(25, 25, 26, 0.9) 100%);
    margin-bottom: 32px;
}

.copy-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #999;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.4);
    color: #e0c3fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.3);
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(25, 25, 25, 0.6);
    backdrop-filter: blur(16px);
    color: #e8e8e8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background: rgba(35, 35, 35, 0.8);
    border-color: rgba(138, 43, 226, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 64px rgba(138, 43, 226, 0.3);
}

.btn.primary {
    background: linear-gradient(135deg, #8a2be2 0%, #4b0082 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.3);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #9d4edd 0%, #5a189a 100%);
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.5);
}

.btn.danger {
    background: linear-gradient(135deg, #ff4757 0%, #dc143c 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.3);
}

.btn.danger:hover {
    background: linear-gradient(135deg, #ff6b81 0%, #e32636 100%);
    box-shadow: 0 8px 32px rgba(255, 71, 87, 0.5);
}

/* Boutons du header - styles spécifiques */
.header-btn {
    padding: 9px 16px;
    background: rgba(20, 20, 20, 0.6);
    color: #7bed9f;
    border: 1px solid rgba(123, 237, 159, 0.3);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-btn:hover {
    background: rgba(123, 237, 159, 0.15);
    border-color: #7bed9f;
    color: #7bed9f;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(123, 237, 159, 0.3);
}

.header-btn.logout-btn {
    background: rgba(255, 71, 87, 0.1);
    color: #ff6b81;
    border-color: rgba(255, 71, 87, 0.3);
}

.header-btn.logout-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
    color: #ff4757;
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.3);
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section h3 {
    color: #e0c3fc;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #999;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e8e8e8;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #555;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(138, 43, 226, 0.6);
    background: rgba(25, 25, 25, 0.8);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1), 0 4px 16px rgba(138, 43, 226, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.6;
}

.costs-section {
    background: rgba(18, 18, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(16px);
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(25, 25, 25, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cost-item:hover {
    background: rgba(30, 30, 30, 0.7);
    border-color: rgba(138, 43, 226, 0.3);
    transform: translateX(4px);
}

.cost-item-label {
    flex: 1;
    font-weight: 500;
    color: #e8e8e8;
}

.cost-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.counter-btn {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e8e8e8;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.counter-btn:hover {
    background: rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.5);
    color: #e0c3fc;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.3);
}

.counter-display {
    min-width: 44px;
    text-align: center;
    font-weight: 700;
    font-size: 17px;
    color: #e0c3fc;
}

.cost-input {
    width: 100px !important;
    text-align: right;
    font-weight: 600;
}

.checkbox-wrapper {
    position: relative;
    display: inline-block;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 22px;
    height: 22px;
    appearance: none;
    background: rgba(20, 20, 20, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-wrapper input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #8a2be2 0%, #4b0082 100%);
    border-color: #8a2be2;
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 13px;
    font-weight: bold;
}

.select-custom {
    background: rgba(20, 20, 20, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e8e8e8 !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.select-custom:focus {
    border-color: rgba(138, 43, 226, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1), 0 4px 16px rgba(138, 43, 226, 0.2) !important;
    outline: none !important;
}

.footer-links {
    position: fixed;
    bottom: 24px;
    left: 48px;
    display: flex;
    gap: 24px;
    z-index: 50;
}

.footer-links a {
    color: #e0c3fc;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 10px 18px;
    background: rgba(22, 22, 22, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.3);
}

.collapsible-card {
    margin-bottom: 20px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(22, 22, 22, 0.6);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.collapsible-card:hover {
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.2);
}

.collapsible-header {
    cursor: pointer;
    padding: 20px 26px;
    font-size: 16px;
    font-weight: 600;
    background: rgba(18, 18, 18, 0.6);
    color: #e0c3fc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.collapsible-header:hover {
    background: rgba(138, 43, 226, 0.08);
}

.collapsible-header .close-btn {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff6b81;
    font-size: 18px;
    cursor: pointer;
    margin-left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.collapsible-header .close-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    transform: rotate(90deg);
}

.collapsible-content {
    padding: 24px;
    display: block;
    animation: fadeInUp 0.4s;
}

.collapsible-card.collapsed .collapsible-content {
    display: none;
}

.collapsible-card.collapsed .collapsible-header {
    border-radius: 16px;
}

/* Animation pour les éléments qui apparaissent */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 15, 15, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.6), rgba(0, 191, 255, 0.6));
    border-radius: 10px;
    border: 2px solid rgba(15, 15, 15, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.8), rgba(0, 191, 255, 0.8));
}

/* Cards Container - Disposition horizontale */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.cards-container .card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

/* Sub-nav buttons */
.sub-nav-btn {
    padding: 14px 22px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 10px;
    min-width: 130px;
    text-align: center;
    position: relative;
    margin-right: 6px;
}

.sub-nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(138, 43, 226, 0.05) 100%);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sub-nav-btn:hover::before {
    opacity: 1;
}

.sub-nav-btn:hover {
    color: #fff;
    transform: translateY(-2px);
}

.sub-nav-btn.active {
    color: #e0c3fc;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, rgba(138, 43, 226, 0.08) 100%);
    border-bottom: 2px solid #8a2be2;
}

/* ===== NAVBAR CATEGORIES - Animations dynamiques ===== */

.nav-buttons-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 4px 0;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 1000px;
    overflow: hidden;
}

.nav-buttons-group.hidden {
    opacity: 0;
    max-height: 0;
    padding: 0;
    gap: 0;
}

.nav-category {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(20px) saturate(150%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    padding: 0;
}

.nav-category.active {
    opacity: 1;
    pointer-events: auto;
    max-height: 1000px;
    padding: 4px 0;
}

.nav-category-btn {
    position: relative;
    font-weight: 600;
}

.nav-category-btn::after {
    content: '▼';
    margin-left: 6px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-category-btn.active::after {
    transform: rotate(180deg);
}

.nav-category-back-btn {
    background: rgba(138, 43, 226, 0.15) !important;
    color: #8a2be2 !important;
    font-weight: 600;
}

.nav-category-back-btn:hover {
    background: rgba(138, 43, 226, 0.25) !important;
}

.nav-category-back-btn::before {
    background: linear-gradient(90deg, transparent, #8a2be2, transparent) !important;
    width: 60% !important;
}

/* ===== BOUTONS DE REPLI/DEPLI NAVBAR ET SUBNAV ===== */

.nav-toggle-btn {
    position: fixed;
    width: 28px;
    height: 28px;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.4);
    border-radius: 6px;
    color: #e0c3fc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1001;
    transition: all 0.3s ease;
}

.nav-toggle-btn:hover {
    background: rgba(138, 43, 226, 0.35);
    border-color: #8a2be2;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.4);
}

/* Bouton navbar toggle - dans le header à droite */
.navbar-toggle-btn {
    top: 16px;
    right: 16px;
}

/* Bouton subnav toggle - à droite dans la subnav elle-même */
.subnav-toggle-btn {
    top: calc(var(--header-navbar-total) + 12px);
    right: 16px;
}

/* États repliés */
.nav-tabs.collapsed {
    max-height: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

.sub-nav.collapsed {
    max-height: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

/* Ajustement des positions quand navbar est repliée */
body.navbar-collapsed .sub-nav {
    top: var(--header-height);
}

/* Quand navbar repliée, le bouton subnav reste visible */
body.navbar-collapsed .subnav-toggle-btn {
    top: calc(var(--header-height) + 12px);
}

/* Quand subnav repliée, le bouton descend sous le header+navbar */
body.subnav-collapsed .subnav-toggle-btn {
    top: calc(var(--header-navbar-total) + 4px);
}

/* Quand navbar repliée ET subnav repliée */
body.navbar-collapsed.subnav-collapsed .subnav-toggle-btn {
    top: calc(var(--header-height) + 4px);
}

body.navbar-collapsed .main-container {
    margin-top: calc(var(--header-height) + var(--subnav-height));
}

body.navbar-collapsed .main-container.no-subnav {
    margin-top: var(--header-height);
}

/* Ajustement quand sub-nav est repliée */
body.subnav-collapsed .main-container {
    margin-top: var(--header-navbar-total);
}

/* Ajustement quand les deux sont repliées */
body.navbar-collapsed.subnav-collapsed .main-container {
    margin-top: var(--header-height);
}

/* Style distinct pour le bouton subnav */
.subnav-toggle-btn {
    background: rgba(0, 191, 255, 0.2);
    border-color: rgba(0, 191, 255, 0.4);
    color: #7dd3fc;
}

.subnav-toggle-btn:hover {
    background: rgba(0, 191, 255, 0.35);
    border-color: #00bfff;
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.4);
}

/* Animation des icônes de toggle */
.nav-toggle-btn .toggle-icon {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Opacité réduite quand replié pour indiquer l'état */
.nav-toggle-btn.collapsed {
    opacity: 0.7;
}

.nav-toggle-btn.collapsed:hover {
    opacity: 1;
}

/* ===================================
   WELCOME NOTIFIER STYLES
   =================================== */

.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-overlay.show {
    opacity: 1;
}

.welcome-modal {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.welcome-content {
    padding: 40px 35px;
}

.welcome-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.welcome-close:hover {
    background: rgba(255, 77, 77, 0.3);
    transform: rotate(90deg);
}

.welcome-header {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.welcome-header h1 {
    font-size: 32px;
    color: #fff;
    margin: 0;
}

.welcome-body {
    color: #e5e5e5;
}

.welcome-intro {
    font-size: 18px;
    text-align: center;
    margin-bottom: 30px;
    color: #c5c5c5;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 30px;
    flex-shrink: 0;
}

.feature strong {
    display: block;
    color: #4a9eff;
    margin-bottom: 5px;
    font-size: 16px;
}

.feature p {
    margin: 0;
    color: #b5b5b5;
    font-size: 14px;
}

.welcome-cta {
    text-align: center;
    padding: 20px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.welcome-cta p {
    margin: 0 0 15px 0;
    color: #e5e5e5;
}

.welcome-button {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.welcome-button-primary {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.welcome-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

.welcome-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-footer p {
    margin: 0;
    color: #a8a8a8;
    font-size: 14px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .welcome-modal {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .welcome-content {
        padding: 30px 20px;
    }
    
    .welcome-header h1 {
        font-size: 24px;
    }
    
    .welcome-icon {
        font-size: 40px;
    }
    
    .feature {
        gap: 12px;
        padding: 12px;
    }
    
    .feature-icon {
        font-size: 24px;
    }
}

/* ================================
   MODAL COMPTE À REBOURS THÈME
   ================================ */

.theme-countdown-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.theme-countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.theme-countdown-content {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.95), rgba(20, 20, 25, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(138, 43, 226, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: modalSlideUp 0.4s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.theme-countdown-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.theme-countdown-close:hover {
    background: rgba(255, 50, 50, 0.8);
    border-color: rgba(255, 50, 50, 1);
    transform: rotate(90deg);
}

.theme-countdown-header {
    text-align: center;
    margin-bottom: 30px;
}

.theme-countdown-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 15px;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.theme-countdown-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-countdown-status {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
}

.theme-countdown-status.locked {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 100, 100, 0.4);
}

.theme-countdown-status.available {
    background: rgba(100, 255, 100, 0.2);
    color: #51cf66;
    border: 1px solid rgba(100, 255, 100, 0.4);
}

.theme-countdown-timer {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px 20px;
    margin-bottom: 25px;
}

.countdown-label {
    text-align: center;
    font-size: 16px;
    color: #b8b8b8;
    margin-bottom: 20px;
    font-weight: 500;
}

.countdown-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.countdown-value {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 80px;
    text-align: center;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.countdown-text {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.countdown-separator {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    margin: 0 5px;
    align-self: flex-start;
    margin-top: 0;
}

.theme-countdown-dates {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.theme-countdown-dates p {
    margin: 10px 0;
    line-height: 1.6;
    color: #d0d0d0;
}

.theme-countdown-dates strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.theme-countdown-description {
    text-align: center;
    color: #b8b8b8;
}

.theme-countdown-description p {
    margin: 10px 0;
    line-height: 1.6;
}

.availability-message {
    font-style: italic;
    color: #888;
    font-size: 13px;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .theme-countdown-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .theme-countdown-icon {
        font-size: 48px;
    }
    
    .theme-countdown-header h2 {
        font-size: 24px;
    }
    
    .countdown-value {
        font-size: 36px;
        min-width: 60px;
    }
    
    .countdown-separator {
        font-size: 36px;
    }
    
    .countdown-text {
        font-size: 10px;
    }
    
    .theme-countdown-dates {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .countdown-value {
        font-size: 28px;
        min-width: 50px;
    }
    
    .countdown-separator {
        font-size: 28px;
        margin: 0 2px;
    }
    
    .countdown-unit {
        gap: 5px;
    }
}


