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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f1724 0%, #1a2332 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f1724 0%, #1a2332 50%, #0f1724 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

header {
    background: linear-gradient(135deg, #6c5ce7 0%, #4f46e5 100%);
    padding: 25px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.3);
    animation: fadeIn 0.6s ease;
}

header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
}

.card h2 {
    color: #6c5ce7;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    flex-wrap: wrap;
}

.onboarding {
    text-align: center;
    max-width: 500px;
    margin: 50px auto;
    padding: 0 15px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ddd;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    background: rgba(255, 255, 255, 0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #6c5ce7 0%, #4f46e5 100%);
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
    width: 100%;
    max-width: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.4);
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
    max-width: 150px;
}

.btn-secondary {
    background: transparent;
    color: #6c5ce7;
    padding: 10px 20px;
    border: 2px solid #6c5ce7;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #6c5ce7;
    color: #fff;
}

.btn-danger {
    background: transparent;
    color: #ff4757;
    padding: 8px 16px;
    border: 2px solid #ff4757;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #ff4757;
    color: #fff;
}

.btn-success {
    background: transparent;
    color: #2ecc71;
    padding: 8px 16px;
    border: 2px solid #2ecc71;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.btn-success:hover {
    background: #2ecc71;
    color: #fff;
}

.export-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.table-container {
    overflow-x: auto;
    margin-top: 15px;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

table th {
    background: rgba(108, 92, 231, 0.2);
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(108, 92, 231, 0.5);
    font-size: 0.9rem;
}

table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(108, 92, 231, 0.15);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.stat-card h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #6c5ce7;
    margin-bottom: 5px;
}

.stat-card p {
    color: #ddd;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 5px;
    white-space: nowrap;
}

.badge-pending { background: #f39c12; color: #fff; }
.badge-approved { background: #2ecc71; color: #fff; }
.badge-rejected { background: #e74c3c; color: #fff; }
.badge-active { background: #3498db; color: #fff; }
.badge-inactive { background: #95a5a6; color: #fff; }
.badge-soon { background: #f39c12; color: #fff; }
.badge-late { background: #e74c3c; color: #fff; }

.success-message {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    margin-top: 50px;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.footer-links a {
    color: #6c5ce7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #4f46e5;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #1a2332;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.modal-content h2 {
    color: #6c5ce7;
    margin-bottom: 20px;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.modal-content h3 {
    color: #4f46e5;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.modal-content p, .modal-content ul {
    color: #ddd;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-content ul {
    padding-left: 20px;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #ff4757;
    transform: rotate(90deg);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(108, 92, 231, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    z-index: 999;
    animation: slideUp 0.5s ease;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-content i {
    font-size: 2rem;
    color: #fff;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
}

.cookie-content a {
    color: #fff;
    text-decoration: underline;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

.hidden {
    display: none !important;
}

/* Responsive pour tablettes */
@media (max-width: 992px) {
    .container {
        padding: 15px;
    }

    .card {
        padding: 20px 15px;
    }

    table {
        font-size: 0.85rem;
    }

    table th, table td {
        padding: 10px 6px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive pour mobiles */
@media (max-width: 768px) {
    header {
        padding: 20px 15px;
    }

    .card {
        padding: 15px;
    }

    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px 10px;
    }

    .btn-primary {
        width: 100%;
        max-width: 100%;
    }

    .btn-secondary,
    .btn-danger,
    .btn-success {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .export-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .export-buttons .btn-secondary {
        width: 100%;
        margin: 5px 0;
    }

    table {
        min-width: 500px;
        font-size: 0.8rem;
    }

    table th, table td {
        padding: 8px 5px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .modal-content {
        padding: 20px;
        max-height: 90vh;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-content .btn-primary {
        width: 100%;
    }
}

/* Responsive pour petits mobiles */
@media (max-width: 480px) {
    .onboarding {
        margin: 30px auto;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 400px;
        font-size: 0.75rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .card h2 {
        font-size: 1.1rem;
    }
}

/* Plan Badge */
.plan-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.plan-free {
    background: rgba(149, 165, 166, 0.3);
    color: #95a5a6;
    border: 1px solid #95a5a6;
}

.plan-pro {
    background: rgba(241, 196, 15, 0.3);
    color: #f1c40f;
    border: 1px solid #f1c40f;
}

/* Limit Warning */
.limit-warning {
    background: rgba(231, 76, 60, 0.15);
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.limit-warning i {
    font-size: 2rem;
    color: #e74c3c;
}

.limit-warning strong {
    display: block;
    color: #e74c3c;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.limit-warning p {
    color: #ddd;
    margin: 0;
}

/* Upgrade Section */
.upgrade-section {
    text-align: center;
    margin-top: 30px;
    padding: 25px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 12px;
    border: 2px dashed rgba(108, 92, 231, 0.3);
}

.btn-upgrade {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-upgrade:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.6);
}

.btn-upgrade i {
    font-size: 1.3rem;
}

.upgrade-benefits {
    margin-top: 15px;
    color: #ddd;
    font-size: 0.95rem;
}

/* Button Loading State */
.btn-loading {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments for upgrade section */
@media (max-width: 768px) {
    .limit-warning {
        flex-direction: column;
        text-align: center;
    }

    .btn-upgrade {
        width: 100%;
        justify-content: center;
    }

    .upgrade-benefits {
        font-size: 0.85rem;
    }
}