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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
}

header h1 {
    margin-bottom: 20px;
    font-size: 2em;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-info {
    background: #4299e1;
    color: white;
}

.btn-danger {
    background: #f56565;
    color: white;
}

/* Statistiques */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f7fafc;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 3em;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9em;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #2d3748;
}

.stat-total .stat-value {
    color: #667eea;
}

.stat-confirmed .stat-value {
    color: #48bb78;
}

.stat-declined .stat-value {
    color: #f56565;
}

.stat-pending .stat-value {
    color: #ed8936;
}

/* Tableau */
.table-container {
    padding: 30px;
}

#guestsTable {
    width: 100% !important;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-confirmed {
    background: #c6f6d5;
    color: #22543d;
}

.badge-declined {
    background: #fed7d7;
    color: #742a2a;
}

.badge-pending {
    background: #feebc8;
    color: #7c2d12;
}

.btn-edit {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    transition: transform 0.2s;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit:hover {
    transform: scale(1.2);
}

.btn-edit:active {
    transform: scale(1.1);
}

/* Style pour la colonne d'action */
.action-column {
    text-align: center;
    width: 60px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

.modal-large {
    max-width: 600px;
}

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

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #718096;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #667eea;
    background: #f7fafc;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f7fafc;
}

.tab-btn.tab-danger {
    color: #e53e3e;
}

.tab-btn.tab-danger:hover,
.tab-btn.tab-danger.active {
    color: #f56565;
    border-bottom-color: #f56565;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Section mot de passe */
.password-section {
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.password-section .form-group {
    margin-bottom: 10px;
}

.help-text {
    font-size: 13px;
    color: #e53e3e;
    margin: 5px 0 0 0;
    font-weight: 600;
}

/* Warning box dans modal */
.warning-box-modal {
    background: #fff5f5;
    border-left: 4px solid #f56565;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.warning-box-modal h3 {
    color: #c53030;
    margin-bottom: 10px;
    font-size: 16px;
}

.warning-box-modal p {
    color: #742a2a;
    margin: 5px 0;
}

.warning-box-modal strong {
    color: #c53030;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2d3748;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.warning {
    background: #fed7d7;
    color: #742a2a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: #48bb78;
}

.toast-error {
    background: #f56565;
}

.toast-info {
    background: #4299e1;
}

/* Responsive */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2em;
    }
    
    /* Amélioration du tableau responsive */
    .table-container {
        padding: 15px;
        overflow-x: auto;
    }
    
    /* DataTable responsive - Cacher certaines colonnes sur mobile */
    #guestsTable {
        font-size: 14px;
    }
    
    #guestsTable thead th {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    #guestsTable tbody td {
        padding: 10px 5px;
        font-size: 13px;
    }
    
    /* Badges plus visibles sur mobile */
    .badge {
        padding: 5px 10px;
        font-size: 11px;
        display: inline-block;
        white-space: nowrap;
    }
    
    /* Bouton édition plus grand sur mobile */
    .btn-edit {
        font-size: 20px;
        padding: 8px 12px;
        min-width: 40px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Wrapper DataTables responsive */
    .dataTables_wrapper {
        overflow-x: auto;
    }
    
    /* Largeur minimale pour les colonnes importantes */
    #guestsTable td:nth-child(1) { /* Nom */
        min-width: 120px;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #guestsTable td:nth-child(5) { /* Statut */
        min-width: 100px;
    }
    
    #guestsTable td:nth-child(6) { /* Actions */
        min-width: 50px;
        text-align: center;
    }
    
    /* Style des lignes expandables de DataTables Responsive */
    table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
    table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
    table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
        cursor: default !important;
    }
    
    table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
    table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
    table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
        display: none !important;
    }
    
    /* Badge et action bien visibles sur mobile */
    table.dataTable > tbody > tr.child ul.dtr-details {
        display: block;
        width: 100%;
    }
    
    table.dataTable > tbody > tr.child ul.dtr-details > li {
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    table.dataTable > tbody > tr.child ul.dtr-details > li .badge {
        display: inline-block;
        margin: 5px 0;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 2em;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    /* Forcer le mode card pour DataTables sur très petits écrans */
    #guestsTable.dataTable {
        border-collapse: collapse !important;
    }
    
    /* Augmenter encore la taille du bouton édition */
    .btn-edit {
        font-size: 24px;
        padding: 10px 15px;
        min-width: 50px;
        min-height: 50px;
    }
    
    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}