/* ==========================================================================
   Actualites – Drawer light editor
   ========================================================================== */

.actualite-drawer-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999999999;
    opacity: 0;
    transition: opacity .3s ease;
    justify-content: flex-end;
}
.actualite-drawer-overlay.active { display: flex; }
.actualite-drawer-overlay.show   { opacity: 1; }

.actualite-drawer {
    background: white;
    width: 100%;
    max-width: 1000px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 20px rgba(0,0,0,.1);
    border-radius: 30px 0 0 0;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow: hidden;
}
.actualite-drawer-overlay.show .actualite-drawer {
    transform: translateX(0);
}
.actualite-drawer-large {
    width: 80%;
    max-width: 1200px;
}

.actualite-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #ddd;
    background: #4d74b5;
}
.actualite-drawer-title {
    margin: 0;
    font-family: 'Nexa Light';
    font-size: 20px !important;
    font-weight: 600 !important;
    color: white !important;
}
.actualite-drawer-close {
    border: none;
    background: transparent;
    font-size: 24px;
    color: white !important;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.actualite-drawer-close:hover {
    background: white;
    color: #4d74b5 !important;
}

/* Onglets */
.actualite-drawer-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
}
.actualite-tab {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: "Nexa Light" !important;
    color: #686868 !important;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}
.actualite-tab:hover  { background: #e9eef0; }
.actualite-tab.active {
    color: #4d74b5 !important;
    border-bottom-color: #4d74b5;
    background: white;
}

.actualite-tab-content        { display: none; flex: 1; overflow: hidden; }
.actualite-tab-content.active { display: flex; flex-direction: column; }

/* Iframe */
.actualite-iframe-container { flex: 1; height: 100%; }
#actualite-light-iframe      { width: 100%; height: 100%; border: none; }

/* Participants */
.actualite-participants-wrapper {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.actualite-participants-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.actualite-participants-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
    font-family: 'Nexa Light';
}
.actualite-participants-info { margin: 0; color: #666; font-size: 14px; }

.actualite-participants-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 40px;
    justify-content: center;
    color: #666;
}
.actualite-spinner {
    width: 20px; height: 20px;
    border: 3px solid #f0f0f0;
    border-top-color: #4d74b5;
    border-radius: 50%;
    animation: actualite-spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes actualite-spin { to { transform: rotate(360deg); } }

.actualite-participants-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}
.actualite-participants-empty p { margin: 0; font-size: 16px; }

.actualite-participants-list-container { flex: 1; display: flex; flex-direction: column; }
#actualite-tickets-container           { flex: 1; overflow-y: auto; }

/* Blocs tickets */
.actualite-ticket-group {
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}
.actualite-ticket-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #4d74b5 0%, #3d5a8c 100%);
    color: white;
}
.actualite-ticket-group-left {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}
.actualite-ticket-group-left:hover { opacity: 0.9; }
.actualite-ticket-group-title h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Nexa Light';
}
.actualite-ticket-group-badge {
    background: rgba(255,255,255,0.25);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.actualite-ticket-group-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.actualite-ticket-group-price { font-size: 14px; opacity: 0.9; }
.actualite-btn-export-ticket {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-family: 'Nexa Light';
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.actualite-btn-export-ticket:hover { background: rgba(255,255,255,0.35); }
.actualite-btn-export-ticket svg   { width: 14px; height: 14px; }
.actualite-ticket-group-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0;
    width: 24px; height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.actualite-ticket-group.collapsed .actualite-ticket-group-toggle { transform: rotate(-90deg); }
.actualite-ticket-group-body {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.actualite-ticket-group.collapsed .actualite-ticket-group-body { max-height: 0; }

.actualite-participants-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.actualite-participants-table th,
.actualite-participants-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.actualite-participants-table th {
    background: #f5f7fa;
    font-weight: 600;
    color: #333;
    font-family: 'Nexa Light';
    position: sticky;
    top: 0;
}
.actualite-participants-table th:first-child { width: 50px; text-align: center; }
.actualite-participants-table td:first-child  { text-align: center; color: #888; }
.actualite-participants-table tbody tr:hover  { background: #f9fbfc; }

.actualite-participants-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0 0;
    margin-top: auto;
    border-top: 1px solid #eee;
}
.actualite-participants-count { margin: 0; color: #666; font-size: 14px; }
#actualite-tickets-count-info  { color: #888; font-weight: normal; }

.actualite-button-export-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4d74b5;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-family: 'Nexa Light';
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.actualite-button-export-pdf:hover    { background: #3d5a8c; }
.actualite-button-export-pdf:disabled { opacity: 0.6; cursor: not-allowed; }

.actualite-drawer-trigger.btn-gestion-equipe {
    background: white;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Couleurs alternees pour les groupes de tickets */
.actualite-ticket-group:nth-child(2n) .actualite-ticket-group-header {
    background: linear-gradient(135deg, #4d74b5 0%, #3d5a8c 100%);
}
.actualite-ticket-group:nth-child(3n) .actualite-ticket-group-header {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}
.actualite-ticket-group:nth-child(4n) .actualite-ticket-group-header {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}
.actualite-ticket-group:nth-child(5n) .actualite-ticket-group-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

@media (max-width: 768px) {
    .actualite-drawer { width: 100%; max-width: 100%; border-radius: 0; }
    .actualite-participants-table th,
    .actualite-participants-table td { padding: 10px 8px; font-size: 13px; }
    .actualite-participants-footer   { flex-direction: column; gap: 15px; }
    .actualite-ticket-group-header   { flex-wrap: wrap; gap: 10px; }
    .actualite-ticket-group-actions  { flex-wrap: wrap; }
    .actualite-btn-export-ticket span { display: none; }
}
