@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #252525;
    --neon-blue: #00d4ff;
    --neon-purple: #8b5cf6;
    --neon-pink: #f472b6;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --success: #10b981;
    --danger: #ef4444;
    --border: #374151;
}

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 40% 80%, rgba(244, 114, 182, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

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

.header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-input, .form-select {
    width: 100%;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--neon-purple);
}

.btn-success {
    background: linear-gradient(45deg, var(--success), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger), #dc2626);
    color: white;
}

.btn-full {
    width: 100%;
}

.dashboard {
    display: none;
}

.dashboard.active {
    display: block;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-text {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.guestlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.guestlist-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guestlist-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
}

.guestlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-blue);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
}

.guestlist-view {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
}

.guestlist-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.guestlist-table th,
.guestlist-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.guestlist-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.guestlist-table tr:hover {
    background: var(--bg-secondary);
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
}

.checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.public-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border);
}

.flyer-container {
    text-align: center;
    margin-bottom: 40px;
}

.flyer {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--neon-purple), var(--neon-pink));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-closed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

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

.modal-content {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.close-modal:hover {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .logo {
        font-size: 2rem;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

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

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

    .card-actions {
        flex-direction: column;
    }

    .btn-small {
        min-width: auto;
    }

    .guestlist-table {
        font-size: 14px;
    }

    .guestlist-table th,
    .guestlist-table td {
        padding: 10px 8px;
    }
}

/* Styles pour les filtres et nouvelles fonctionnalités */

.filter-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    margin: 0 5px;
}

.filter-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.filter-btn.active {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Styles pour les liens publics dans les cartes */
.public-link-container {
    margin: 15px 0;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.public-link-input {
    flex: 1;
    padding: 8px;
    font-size: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-family: monospace;
}

.copy-button {
    padding: 8px 12px;
    font-size: 12px;
    background: var(--neon-blue);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: var(--neon-purple);
    transform: translateY(-1px);
}

.copy-button.copied {
    background: var(--success) !important;
}

/* Amélioration des boutons d'action */
.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 15px;
}

.card-actions .btn-small {
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    min-width: auto;
}

/* Styles pour le bouton supprimer */
.btn-delete {
    background: linear-gradient(45deg, #dc2626, #991b1b) !important;
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-delete:hover {
    background: linear-gradient(45deg, #991b1b, #7f1d1d) !important;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
}

.btn-delete::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-delete:hover::before {
    left: 100%;
}

/* Modal pour le lien public */
.link-modal .modal-content {
    max-width: 600px;
}

.link-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
}

.link-input-container input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 14px;
}

/* Responsive pour les filtres */
@media (max-width: 768px) {
    .filter-controls > div {
        flex-direction: column;
        padding: 10px;
    }
    
    .filter-btn {
        margin: 5px 0;
        width: 100%;
    }
    
    .card-actions {
        grid-template-columns: 1fr;
    }
    
    .link-input-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .link-input-container input {
        width: 100%;
    }
}

/* Animation pour les notifications */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideInDown 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.notification.success {
    background: linear-gradient(45deg, var(--success), #059669);
}

.notification.error {
    background: linear-gradient(45deg, var(--danger), #dc2626);
}

/* Améliorations visuelles pour les stats */
.stat-number {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Indicateur de chargement */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--neon-blue);
    animation: spin 1s ease-in-out infinite;
}

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

/* Styles pour les tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Animation pour les notifications */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideInDown 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    max-width: 400px;
    word-wrap: break-word;
}

.notification.success {
    background: linear-gradient(45deg, #10b981, #059669);
}

.notification.error {
    background: linear-gradient(45deg, #ef4444, #dc2626);
}

/* Style pour les inputs de lien */
.link-input {
    font-family: 'Courier New', monospace !important;
    font-size: 11px !important;
    user-select: all;
}

.link-input:focus {
    outline: 2px solid var(--neon-blue);
    outline-offset: 1px;
}

/* Boutons d'action pour les liens */
.link-actions {
    display: flex;
    gap: 3px;
}

.link-btn {
    padding: 4px 6px !important;
    font-size: 10px !important;
    min-width: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}