/* === RECEVOIR SYNTHÈSE - STYLES === */

/* Styles spécifiques pour cette page */
.choice-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.choice-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.choice-card:hover {
    border-color: #007ca1;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,124,161,0.15);
    text-decoration: none;
    color: inherit;
}

.choice-card.selected {
    border-color: #007ca1;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    box-shadow: 0 4px 15px rgba(0,124,161,0.2);
}

.choice-card h3 {
    margin: 0 0 10px 0;
    color: #007ca1;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

.choice-card.selected h3 {
    color: #1565c0;
}

.choice-card p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
    color: #666;
    text-align: center;
}

.choice-card.selected p {
    color: #1565c0;
}

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

.choice-card:hover::before {
    left: 100%;
}

.actions-container {
    display: none;
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.actions-container.visible {
    display: block;
    animation: slideIn 0.3s ease-out;
}

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

.actions-title {
    color: #007ca1;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 15px;
    justify-items: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-action {
    background-color: #007ca1;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-action:hover {
    background-color: #005f7a;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.btn-action:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.btn-action.loading {
    background-color: #005f7a;
    cursor: wait;
    transform: none;
}

.btn-action.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

.btn-email {
    background-color: #007ca1;
}
.btn-email:hover {
    background-color: #005f7a;
}

.btn-pdf {
    background-color: #d32f2f;
}
.btn-pdf:hover {
    background-color: #b71c1c;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.format-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    color: #856404;
    font-size: 0.9em;
}

.info-email {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #1565c0;
    font-size: 0.9em;
}

.loading-status {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

.debug-details {
    margin-top: 20px;
    text-align: left;
}

.debug-details summary {
    cursor: pointer;
    color: #666;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
}

.debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.4;
}

/* ✅ NOUVEAU : Styles pour sélection période et salariés */
.period-selection-section, .salaries-selection-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.section-title {
    color: #007ca1;
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
}

.period-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.selector-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selector-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
}

.period-selector {
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    color: #2c3e50;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-selector:hover {
    border-color: #007ca1;
}

.period-selector:focus {
    outline: none;
    border-color: #007ca1;
    box-shadow: 0 0 0 3px rgba(0,124,161,0.1);
}

.salaries-list {
    display: grid;
    gap: 12px;
}

.salarie-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.salarie-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,124,161,0.05), transparent);
    transition: left 0.5s;
}

.salarie-item:hover::before {
    left: 100%;
}

.salarie-item:hover {
    border-color: #007ca1;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,124,161,0.15);
}

.salarie-item.selected {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #007ca1;
    box-shadow: 0 4px 15px rgba(0,124,161,0.2);
}

.salarie-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    accent-color: #007ca1;
    cursor: pointer;
}

.salarie-info {
    flex: 1;
    cursor: pointer;
}

.salarie-nom {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 1em;
}

.salarie-email {
    font-size: 0.9em;
    color: #6c757d;
}

/* ✅ NOUVEAU : Styles pour le bouton de vérification prorata */
.btn-prorata-check {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-prorata-check:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.btn-prorata-check:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.prorata-results {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    animation: slideDown 0.3s ease-out;
}

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

.prorata-diff-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.prorata-diff-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.prorata-diff-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
}

.prorata-diff-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.prorata-diff-table tr:hover {
    background: #f8f9fa;
}

.btn-pdf-correction {
    display: inline-block;
    background: #d32f2f;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-pdf-correction:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
    text-decoration: none;
    color: white;
}

/* ✅ NOUVEAU : Styles pour le bouton d'aide prorata */
.btn-help-prorata {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-help-prorata:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

@media (max-width: 768px) {
    .choice-container {
        grid-template-columns: 1fr;
    }
    .actions-grid {
        grid-template-columns: 1fr;
    }
    .period-selectors {
        grid-template-columns: 1fr;
    }
    .salarie-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .salarie-checkbox {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
