/* ===== Gestion des Réunions - Main Styles ===== */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 25px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: var(--text-dark);
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 0%, #1a252f 100%);
    color: var(--text-light);
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.sidebar-brand small {
    font-size: 0.75rem;
    opacity: 0.7;
    display: block;
    margin-top: 4px;
}

.sidebar-menu {
    padding: 15px 0;
    list-style: none;
}

.sidebar-menu li {
    margin: 2px 10px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar-menu li a .icon {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar-menu .menu-title {
    padding: 15px 15px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.5;
    font-weight: 600;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.top-bar {
    background: #ffffff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.content-area {
    padding: 25px 30px;
}

/* ===== Cards ===== */
.card-custom {
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-custom .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    font-weight: 600;
}

.card-custom .card-body {
    padding: 20px;
}

/* ===== Stats Cards ===== */
.stat-card {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
}

.stat-card .stat-icon.bg-primary-custom {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stat-card .stat-icon.bg-success-custom {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.stat-card .stat-icon.bg-warning-custom {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.stat-card .stat-icon.bg-danger-custom {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.stat-card .stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.stat-card .stat-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn-custom {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-custom-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #ffffff;
}

.btn-custom-primary:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-custom-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: #ffffff;
}

.btn-custom-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    color: #ffffff;
}

.btn-custom-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
}

.btn-custom-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    color: #ffffff;
}

/* ===== Tables ===== */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: var(--primary-color);
    color: #ffffff;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.table-custom thead th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.table-custom thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.table-custom tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table-custom tbody tr:hover {
    background-color: #f8f9fa;
}

.table-custom tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--radius-sm);
}

.table-custom tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--radius-sm) 0;
}

/* ===== Badges ===== */
.badge-custom {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-planifiee {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-en_cours {
    background: #fff3e0;
    color: #e65100;
}

.badge-terminee {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-annulee {
    background: #fce4ec;
    color: #c62828;
}

.badge-fondateur {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: #ffffff;
}

.badge-membre {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #ffffff;
}

.badge-invite {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #ffffff;
}

.badge-observateur {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: #ffffff;
}

.badge-present {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-absent {
    background: #fce4ec;
    color: #c62828;
}

.badge-excuse {
    background: #fff3e0;
    color: #e65100;
}

.badge-en_attente {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* ===== Forms ===== */
.form-control-custom {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 15px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-custom:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    outline: none;
}

.form-label-custom {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

/* ===== QR Code Section ===== */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.qr-container img {
    border: 5px solid #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

/* ===== Scan Page ===== */
.scan-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 60px 30px;
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.scan-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.scan-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.scan-result-card {
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.scan-result-card .participant-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3rem;
    color: #ffffff;
    font-weight: 700;
}

/* ===== Meeting Card ===== */
.meeting-card {
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.2s ease;
}

.meeting-card:hover {
    transform: translateX(5px);
}

.meeting-card.status-planifiee {
    border-left-color: #3498db;
}

.meeting-card.status-en_cours {
    border-left-color: #f39c12;
}

.meeting-card.status-terminee {
    border-left-color: #27ae60;
}

.meeting-card.status-annulee {
    border-left-color: #e74c3c;
}

.meeting-card h5 {
    font-weight: 600;
    margin-bottom: 8px;
}

.meeting-card .meeting-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: #6c757d;
    font-size: 0.9rem;
}

.meeting-card .meeting-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h4 {
    font-weight: 600;
    margin-bottom: 10px;
}

/* ===== Participant Info Card (for scan result) ===== */
.participant-info {
    text-align: left;
    margin-top: 20px;
}

.participant-info .info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.participant-info .info-row:last-child {
    border-bottom: none;
}

.participant-info .info-label {
    font-weight: 600;
    color: #6c757d;
    width: 140px;
    flex-shrink: 0;
}

.participant-info .info-value {
    color: var(--text-dark);
    font-weight: 500;
}

/* ===== Print Styles ===== */
@media print {
    .sidebar, .top-bar, .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .content-area {
        padding: 0 !important;
    }
    .card-custom {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .stat-card {
        margin-bottom: 15px;
    }
    .content-area {
        padding: 15px;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* ===== QR Scanner Video ===== */
#qr-reader {
    border: 3px solid var(--secondary-color);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

#qr-reader video {
    width: 100%;
    border-radius: var(--radius-sm);
}

/* ===== Action Buttons in Tables ===== */
.action-btns {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

.action-btns .btn {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}