/* 
 * CSS Frontend pour EMPLOIVÉLO Salary Survey
 * Fichier: assets/survey.css
 */

/* =============================================================================
   VARIABLES CSS
   ========================================================================== */
:root {
    --ev-primary: #0073aa;
    --ev-primary-dark: #005177;
    --ev-secondary: #00a0d2;
    --ev-success: #46b450;
    --ev-warning: #ffb900;
    --ev-error: #dc3232;
    --ev-gray-light: #f1f1f1;
    --ev-gray: #ddd;
    --ev-gray-dark: #666;
    --ev-text: #23282d;
    --ev-border-radius: 4px;
    --ev-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
    --ev-transition: all 0.2s ease-in-out;
}

/* =============================================================================
   CONTENEUR PRINCIPAL
   ========================================================================== */
.ev-survey-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--ev-border-radius);
    box-shadow: var(--ev-box-shadow);
    overflow: hidden;
}

.ev-survey-header {
    background: linear-gradient(135deg, var(--ev-primary) 0%, var(--ev-secondary) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.ev-survey-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.ev-survey-description {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    line-height: 1.5;
}

/* =============================================================================
   FORMULAIRE
   ========================================================================== */
#ev-survey-container {
    position: relative;
}

#ev-salary-survey-form {
    padding: 30px;
}

/* Messages */
#ev-survey-messages {
    margin-bottom: 20px;
    display: block !important;
    min-height: 10px;
    height: auto !important;
    visibility: visible !important;
}

.ev-message {
    padding: 15px 20px;
    border-radius: var(--ev-border-radius);
    margin-bottom: 15px;
    font-weight: 500;
}

.ev-message.success {
    background: #87F8AE;
    color: #004963;
    border: 0;
    border-radius: 10px;
}

.ev-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Sections */
.ev-form-section {
    margin-bottom: 40px;
    position: relative;
}

.ev-form-section:last-child {
    margin-bottom: 20px;
}

.ev-form-section .titleh3, .title_salaire {
    font-size: 2.3em;
    margin: 0 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ev-gray-light);
    font-weight: 600;
    display:block;
     font-family: "Chillax-Variable", Sans-serif;
}

/* Lignes et groupes */
.ev-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ev-form-group {
    flex: 1;
    min-width: 250px;
}

.ev-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--ev-text);
        font-size: 1.2em;
    font-family: "Work Sans", Sans-serif;
}

.ev-form-group label:after {
    content: " *";
    color: var(--ev-error);
}

.ev-form-group label[for="bonuses"]:after,
.ev-form-group label[for="benefits"]:after,
.ev-form-group label[for="education"]:after {
    content: "";
}

/* Champs de saisie */
.ev-form-group input[type="text"],
.ev-form-group input[type="number"],
.ev-form-group input[type="email"],
.ev-form-group select,
.ev-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--ev-gray);
    border-radius: var(--ev-border-radius);
    font-size: 16px;
    transition: var(--ev-transition);
    font-family: inherit;
    background: #fff;
    height:2.8em;
}

.ev-form-group input:focus,
.ev-form-group select:focus,
.ev-form-group textarea:focus {
    outline: none;
    border-color: var(--ev-primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.ev-form-group input:invalid {
  /*  border-color: var(--ev-error);*/
}

.ev-form-group small {
    display: block;
    margin-top: 5px;
    color: var(--ev-gray-dark);
    font-size: 1em;
}

/* Textarea */
.ev-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox RGPD */
.ev-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.4;
}

.ev-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
    flex-shrink: 0;
    transform: scale(1.2);
}

.ev-checkbox-label:after {
    content: " *" !important;
    color: var(--ev-error);
}

/* Bouton de soumission */
.ev-form-submit {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--ev-gray-light);
}

#ev-submit-btn {
    background-color:#87F8AE;
    color: #324857;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--ev-border-radius);
    cursor: pointer;
    transition: var(--ev-transition);
    position: relative;
    min-width: 300px;
}

#ev-submit-btn:hover {
    transform: translateY(-2px);
   /* box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);*/
}

#ev-submit-btn:active {
    transform: translateY(0);
}

#ev-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ev-btn-loader {
    position: absolute;
  /*  left: 50%;*/
    top: 50%;
    transform: translate(-50%, -50%);
    width: 300px
}

/* =============================================================================
   STATISTIQUES PUBLIQUES
   ========================================================================== */
.ev-public-stats {
    margin: 30px 0;
}

.ev-public-stats h3 {
    color: var(--ev-primary);
    margin-bottom: 20px;
    font-size: 24px;
}

/* Table des statistiques */
.ev-salary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #fff;
    border-radius: var(--ev-border-radius);
    overflow: hidden;
    box-shadow: var(--ev-box-shadow);
}

.ev-salary-table th,
.ev-salary-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--ev-gray-light);
}

.ev-salary-table th {
    background: var(--ev-primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ev-salary-table tbody tr:hover {
    background: rgba(0, 115, 170, 0.05);
}

.ev-salary-amount {
    font-weight: 700;
    color: var(--ev-primary);
    font-size: 16px;
}

.ev-salary-range {
    color: var(--ev-gray-dark);
    font-size: 14px;
}

/* Graphiques */
.ev-stats-chart {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: var(--ev-border-radius);
    box-shadow: var(--ev-box-shadow);
}

/* Footer des stats */
.ev-stats-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--ev-gray-light);
    text-align: center;
}

.ev-stats-footer p {
    margin: 5px 0;
    color: var(--ev-gray-dark);
}

/* Informations personnelles */
.ev-info-box {
    background: rgba(0, 115, 170, 0.05);
    border-left: 4px solid var(--ev-primary);
    padding: 15px;
    margin: 20px 0;
    border-radius: var(--ev-border-radius);
}

.ev-info-box p {
    margin: 0;
    color: var(--ev-gray-dark);
    font-size: 1.2em;
}

/* Notice de confidentialité */
.ev-privacy-notice {
    background: #f9f9f9;
    border: 1px solid var(--ev-gray);
    border-radius: var(--ev-border-radius);
    padding: 15px;
    margin-top: 15px;
    font-size:1.1em;
}

.ev-privacy-notice p {
    margin: 0;
    line-height: 1.5;
}

/* Aide soumission */
.ev-submit-help {
    text-align: center;
    margin-top: 15px !important;
    font-family: "Work Sans", Sans-serif;
    font-size:1em;
}

/* Message de vérification réussie */
.ev-verification-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: var(--ev-border-radius);
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.ev-verification-success h3 {
    color: #155724;
    margin-top: 0;
}

/* Styles pour les champs requis personnels */

.ev-form-group input[type="email"]:focus {
    border-left-color: var(--ev-secondary);
}

.ev-form-group input.valid {
    border-color: var(--ev-success);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="green"><path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.ev-form-group input.error {
    border-color: var(--ev-error);
    background-color: rgba(220, 50, 50, 0.05);
}

/* Animation lors de la soumission réussie */
.ev-form-success {
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Style pour les erreurs de champ */
.ev-field-error {
    color: var(--ev-error);
    font-size: 12px;
    margin-top: 5px;
    display: block;
    padding: 5px 10px;
    background: rgba(220, 50, 50, 0.1);
    border-radius: 3px;
    border-left: 3px solid var(--ev-error);
}

/* =============================================================================
   TEASER PREMIUM
   ========================================================================== */
.ev-stats-teaser {
    position: relative;
    margin: 30px 0;
    background: #fff;
    border-radius: var(--ev-border-radius);
    overflow: hidden;
    box-shadow: var(--ev-box-shadow);
}

.ev-teaser-content {
    position: relative;
}

.ev-teaser-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
}

.ev-stat-item {
    text-align: center;
    padding: 20px;
    background: var(--ev-gray-light);
    border-radius: var(--ev-border-radius);
}

.ev-stat-position {
    font-weight: 600;
    color: var(--ev-primary);
    margin-bottom: 10px;
}

.ev-stat-salary {
    font-size: 24px;
    font-weight: 700;
    color: var(--ev-text);
    margin-bottom: 5px;
}

.ev-stat-count {
    font-size: 12px;
    color: var(--ev-gray-dark);
}

/* Overlay premium */
.ev-teaser-blur {
    position: relative;
}

.ev-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.95) 50%,
        rgba(255,255,255,1) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.ev-premium-content {
    text-align: center;
    padding: 30px;
    max-width: 400px;
}

.ev-premium-content h4 {
    color: var(--ev-primary);
    margin-bottom: 20px;
    font-size: 20px;
}

.ev-premium-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.ev-premium-content li {
    margin: 10px 0;
    color: var(--ev-gray-dark);
}

.ev-premium-cta {
    display: inline-block;
    background: linear-gradient(135deg, var(--ev-primary) 0%, var(--ev-secondary) 100%);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: var(--ev-border-radius);
    font-weight: 600;
    transition: var(--ev-transition);
}

.ev-premium-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
    color: white;
    text-decoration: none;
}

.ev-blurred-stats {
    padding: 30px;
    filter: blur(3px);
    opacity: 0.5;
}

.ev-blur-item {
    padding: 10px 0;
    font-family: monospace;
    color: var(--ev-gray-dark);
}

/* =============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .ev-survey-wrapper {
        margin: 20px;
        border-radius: 0;
    }
    
    .ev-survey-header {
        padding: 20px;
    }
    
    .ev-survey-header h2 {
        font-size: 24px;
    }
    
    #ev-salary-survey-form {
        padding: 20px;
    }
    
    .ev-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ev-form-group {
        min-width: auto;
        margin-bottom: 20px;
    }
    
    #ev-submit-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    .ev-teaser-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .ev-premium-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .ev-survey-header {
        padding: 15px;
    }
    
    .ev-survey-header h2 {
        font-size: 20px;
    }
    
    #ev-salary-survey-form {
        padding: 15px;
    }
    
    .ev-form-section h3 {
        font-size: 18px;
    }
    
    .ev-salary-table th,
    .ev-salary-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
}







#ev-survey-messages .success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

#ev-survey-messages .warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 3px;
    margin: 10px 0;
    color: #856404;
}







.ev-survey-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ev-survey-form .form-row {
    margin-bottom: 15px;
}

.ev-survey-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.ev-survey-form input,
.ev-survey-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ev-survey-form .submit-btn {
    background: #87F8AE;
    color: #324857;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.ev-survey-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.ev-survey-message.success {
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.ev-survey-message.error {
    background: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

#ev-update-section {
    background: #F9FAFB; 
    padding: 15px; 
    border-radius: 10px; 
    margin-bottom: 20px;

}
#ev-update-section .titre, #ev-survey-messages .titre, #verif .titre {
    font-family: "Chillax-Variable", Sans-serif;
    font-size: 2em;
    font-weight: 500;
    text-transform: none;
    letter-spacing: -1px;
    color: #004963;
}
#ev-update-form > button {background: #004963; color: #87F8AE; border: none; padding: 10px 20px; border-radius: 3px; cursor: pointer; white-space: nowrap; }

/* Style pour les optgroups */
#job_position optgroup {
    font-weight: bold;
    font-style: normal;
    color: #0073aa;
    background-color: #f0f6fc;
    padding: 5px 0;
}

#job_position option {
    padding-left: 10px;
    font-weight: normal;
    color: #333;
}

#job_position {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
/* Wrapper du tableau */
.ev-stats-table-wrapper {
    margin: 40px 0;
}

.ev-stats-table-wrapper h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}
/* Nom du département avec indentation */
.ev-department-name {
    padding-left: 40px !important;
    font-weight: 500;
}

/* Tableau principal */
.ev-stats-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

/* En-tête du tableau */
.ev-stats-table thead tr {
    background: #004963;
    color: #87F8AE;
    font-family: "Chillax-Variable", Sans-serif;
}

.ev-stats-table thead th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ev-stats-table thead th:nth-child(2),
.ev-stats-table thead th:nth-child(3),
.ev-stats-table thead th:nth-child(4) {
    text-align: center;
}

/* Lignes de catégorie - fond gris uniforme */
.ev-category-row {
    background: #f8f9fa !important;
}

.ev-category-row td {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    border: none;
}

/* Pastille de couleur devant la catégorie */
.ev-category-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

/* Lignes de postes */
.ev-job-row {
    transition: background 0.2s ease;
    background: #fff;
}

.ev-job-row:hover {
    background: #DFFFDE !important;
}

.ev-job-row td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

/* Cellules spécifiques */
.ev-job-name {
    padding-left: 40px !important;
}

.ev-job-count {
    text-align: center;
    font-weight: 500;
}

.ev-salary-amount {
    text-align: center;
    font-weight: 600;
    color: #EE594A;
    font-size: 15px;
}

.ev-salary-range {
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* Dernière ligne sans bordure */
.ev-job-row:last-child td {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .ev-stats-table {
        font-size: 13px;
    }
    
    .ev-stats-table thead th,
    .ev-job-row td {
        padding: 10px 8px;
    }
    
    .ev-job-name {
        padding-left: 20px !important;
    }
    
    .ev-category-badge {
        width: 10px;
        height: 10px;
        margin-right: 8px;
    }
}
.ev-salary-calculator {
        background: #f8f9fa;
        padding: 20px;
        border-radius: 8px;
        margin: 20px 0;
    }
    
    .ev-filter-row {
        display: flex;
        gap: 15px;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }
    
    .ev-filter-group {
        flex: 1;
        min-width: 200px;
    }
    
    .ev-filter-group label {
        display: block;
        font-weight: bold;
        margin-bottom: 5px;
    }
    
    .ev-filter-group select {
        width: 100%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    .ev-calc-button {
        background: #87F8AE;
        color:#324857;
        font-weight:600;
        padding: 12px 25px;
        border: none;
        border-radius: 5px;
        font-weight: bold;
        cursor: pointer;
        margin-top: 10px;
    }
    
    .ev-calc-button:hover {
            transform: translateY(-2px);
    }
    
    .ev-results-container {
        margin-top: 20px;
        padding: 20px;
        background: #DFFFDE;
        border-radius: 5px;
        font-family: "Chillax-Variable", Sans-serif;
    }
    
    .ev-salary-highlight {
        font-size: 2.2em;
        font-weight: 600;
        color: #004963;
        text-align: center;
        
    }
    
    .ev-salary-range {
        text-align: center;
        color: #666;
        margin-bottom: 15px;
        font-weight: 500;
    }
    
    .ev-loading {
        text-align: center;
        color: #666;
        font-style: italic;
    }
     .ev-salary-range-widget {
        padding: 25px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        margin: 20px 0;
    }
    
    .ev-range-title {
        text-align: center;
        color: #004963;
        font-family: "Chillax-Variable", Sans-serif;
        margin: 0 0 30px 0;
        font-size: 20px;
    }
    
    .ev-range-container {
        position: relative;
        padding: 60px 20px 40px;
    }
    
    /* Barre de gradient */
    .ev-range-bar {
        position: relative;
        height: 12px;
        background: linear-gradient(to right, #FF6B73, #FFB366, #7BC67E , #5AC780);
        border-radius: 20px;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    }
    

    
    /* Marqueurs */
    .ev-range-marker {
        position: absolute;
        top: 50%;
        transform: translateX(-50%);
    }
    
    .ev-marker-line {
        width: 3px;
        height: 30px;
        background: #333;
        margin: 0 auto;
        transform: translateY(-18px);
        border-radius: 2px;
    }
    
    .ev-marker-value {
        position: absolute;
        top: -45px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        font-weight: 700;
        font-size: 16px;
        color: #004963;
        font-family: "Chillax-Variable", Sans-serif;
    }
    
    .ev-marker-label {
        position: absolute;
        top: 25px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        font-size: 13px;
        color: #666;
        font-weight: 500;
    }
    
    /* Style spécifique médian */
    .ev-marker-median .ev-marker-line {
        background: #004963;
        width: 4px;
        height: 35px;
    }
    
    .ev-marker-median .ev-marker-value {
        font-size: 18px;
        color: #EE594A;
    }
    
    .ev-range-footer {
        text-align: center;
        margin-top: 20px;
        color: #666;
        font-size: 13px;
    }
    
    .ev-salary-range-error {
        background: #fff3cd;
        border: 1px solid #ffc107;
        padding: 20px;
        border-radius: 8px;
        text-align: center;
        color: #856404;
    }
    
    /* Responsive */
    @media (max-width: 600px) {
        .ev-range-container {
            padding: 70px 10px 40px;
        }
        
        .ev-marker-value {
            font-size: 14px;
            top: -50px;
        }
        
        .ev-marker-median .ev-marker-value {
            font-size: 15px;
        }
        
        .ev-marker-label {
            font-size: 11px;
        }
    }
