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

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

.admin-wrapper {
    max-width: 1800px;
    margin: 0 auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
    padding: 0 20px 15px 20px;
}

.top-bar-left {
    flex: 1;
}

.top-bar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-home {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-logout {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(244, 67, 54, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.tabs-container {
    display: flex;
    gap: 5px;
    padding: 0 20px;
    margin-bottom: 0;
}

.tab {
    background: rgba(255, 255, 255, 0.7);
    color: #555;
    padding: 15px 30px;
    border: none;
    border-radius: 15px 15px 0 0;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    top: 2px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.tab:hover {
    background: rgba(255, 255, 255, 0.85);
}

.tab.active {
    background: white;
    color: #667eea;
    top: 0px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
    border-bottom: 3px solid white;
}

.content-wrapper {
    background: white;
    border-radius: 0 15px 15px 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-height: 500px;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

h1 {
    color: #667eea;
    font-size: 2.2em;
    font-weight: 700;
}
h2 {
    color: #667eea;
    margin: 30px 0 15px;
    font-size: 1.5em;
}

.error {
    color: #d32f2f;
    padding: 15px;
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

#loading {
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 20px;
}
    color: #d32f2f;
    padding: 15px;
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}
#loading {
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 20px;
}
#stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.stat-card {
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
}
.stat-card h3 {
    color: #555;
    font-size: 0.95em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
}
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}
tr:hover {
    background-color: #f8f9fa;
}
tr:last-child td {
    border-bottom: none;
}
button {
    padding: 8px 16px;
    margin: 3px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.2s ease;
}
.status-en_cours_de_paiement {
    background-color: #fff3cd;
}
.status-confirmee {
    background-color: #d4edda;
}
.btn-pay {
    background: linear-gradient(135deg, #ffc107 0%, #ffa000 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}
.btn-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}
.btn-confirm {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}
.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}
.btn-cancel {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}
.btn-cancel:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.modal-header h2 {
    color: #667eea;
    margin: 0;
}
.close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}
.close:hover {
    color: #333;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
}
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.modal-buttons button {
    flex: 1;
}
/* Quill Editor Styles */
#editor-container {
    height: 350px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.ql-toolbar {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.ql-container {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    font-size: 1em;
}
@media (max-width: 768px) {
    .container { padding: 20px; }
    h1 { font-size: 1.6em; }
    .header { flex-direction: column; gap: 15px; }
    table { font-size: 0.85em; }
    th, td { padding: 10px; }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-in;
}

.loading-overlay.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

.loading-box {
    background: white;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

/* Sub-tabs pour séparer les sections dans l'administration */
.sub-tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.sub-tab {
    background: transparent;
    color: #666;
    padding: 12px 24px;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.sub-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.sub-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.admin-section {
    animation: fadeIn 0.3s ease-in;
}

/* Note icon in reservations table */
.note-icon {
    font-size: 1.3em;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.15s ease;
    title: attr(title);
}

.note-icon:hover {
    transform: scale(1.3);
}
