/**
 * HORIZONS CARRIÈRE - DESIGN SYSTEM COMPLET
 * Style : Tablette / Épuré (basé sur DC1 Schwartz)
 * Police : Aptos intégrale
 */

/* ============================================
   FIX POPUP - Cacher le formulaire au chargement
   ============================================ */

/* Le JavaScript le réaffichera après la fermeture de la popup */

/* --- STRUCTURE GLOBALE --- */
body {
    background-color: #fcfcfc;
    margin: 0;
    padding: 0;
}

.dc-tablet-container {
    font-family: 'Aptos', sans-serif;
    max-width: 650px;
    margin: 20px auto;
    padding: 40px 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: visible !important;
    color: #101820;
}

.title-dc2 {
    font-family: 'Aptos', sans-serif;
    color: #043b5c;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- FORMULAIRE D'IDENTIFICATION --- */
.dc-input, .dc-select {
    font-family: 'Aptos', sans-serif;
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd !important;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    background: #fdfdfd;
    transition: all 0.3s ease;
}

.dc-input:focus, .dc-select:focus {
    border-color: #043b5c !important;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 59, 92, 0.1);
}

/* Sélecteur de Genre */
.genre-selector {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.genre-option {
    flex: 1;
    position: relative;
}

.genre-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.genre-label {
    display: block;
    text-align: center;
    padding: 15px;
    background-color: #e4f1fe;
    color: #101820;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Aptos', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.genre-label:hover,
.genre-option input[type="radio"]:checked + .genre-label {
    background-color: #043b5c;
    color: #ffffff;
}

/* --- BOUTONS --- */
.btn-main {
    width: 100%;
    padding: 20px;
    background-color: #043b5c;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: 'Aptos', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    text-transform: uppercase;
}

.btn-main:hover {
    background-color: #065a8a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.btn-sec {
    flex: 1;
    padding: 15px;
    background: none;
    border: 1px solid #043b5c;
    color: #043b5c;
    border-radius: 10px;
    font-family: 'Aptos', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
}

.btn-sec:hover {
    background: #043b5c;
    color: #ffffff;
    transform: translateY(-1px);
}

/* --- BARRE DE PROGRESSION 6 BLOCS --- */
#p-container.horizons-progress-blocks {
    display: flex !important;
    width: 100% !important;
    gap: 6px !important;
    margin: 0 0 40px 0 !important;
    padding: 20px 15px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: white !important;
    clear: both !important;
    min-height: 80px !important;
    height: auto !important;
    overflow: visible !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    transition: box-shadow 0.3s ease !important;
}

/* Chaque bloc de partie */
.progress-block {
    
    height: 40px;
    background: #f5f5f5;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    min-width: 0;
}

/* Barre de progression interne */
.progress-block > div:first-child {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, #043b5c 0%, #065a8a 100%);
    transition: width 0.4s ease;
}

/* Numéro de partie */
.progress-block > div:last-child {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Aptos', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    z-index: 2;
    transition: color 0.3s ease;
    pointer-events: none;
}

/* Chiffre en blanc quand le bloc est rempli à 100% */
.progress-block[data-filled="100"] > div:last-child {
    color: #ffffff !important;
}

/* États des blocs */
.progress-block.completed {
    border-color: #043b5c;
    background: #e4f1fe;
}

.progress-block.completed > div:last-child {
    color: #043b5c;
}

.progress-block.current {
    border-color: #065a8a;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(4, 59, 92, 0.3);
}

.progress-block.current > div:last-child {
    color: #57575E;
}

.progress-block.upcoming {
    border-color: #e0e0e0;
    background: #f5f5f5;
    box-shadow: none;
}

.progress-block.upcoming > div:last-child {
    color: #999;
}

/* --- QUESTIONS & OPTIONS --- */
.q-row {
    background: #fff;
    padding: 25px 20px;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.q-row:hover {
    background: #fafbfc;
}

.q-text {
    font-family: 'Aptos', sans-serif;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
    color: #2c3e50;
}

.q-options {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    max-width: 100%;
}

.opt-label {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.opt-label input {
    position: absolute;
    opacity: 0;
}

.opt-label span {
    display: block;
    padding: 14px 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    font-family: 'Aptos', sans-serif;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    color: #666;
}

/* Couleur "Pas du tout" (gauche) - Rouge/Froid */
.opt-label:first-child span {
    background: #ffe5e5;
    border-color: #ffcccc;
}

.opt-label:first-child:hover span {
    background: #ffd4d4;
    border-color: #ffb3b3;
}

.opt-label:first-child input:checked + span {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Couleur "Indifférent" (milieu) - Neutre/Gris */
.opt-label:nth-child(2) span {
    background: #f0f0f0;
    border-color: #d9d9d9;
}

.opt-label:nth-child(2):hover span {
    background: #e3e3e3;
    border-color: #c4c4c4;
}

.opt-label:nth-child(2) input:checked + span {
    background: #7f8c8d;
    color: #fff;
    border-color: #7f8c8d;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.3);
}

/* Couleur "Passionnément" (droite) - Vert/Chaud */
.opt-label:last-child span {
    background: #e8f8f5;
    border-color: #d1f2eb;
}

.opt-label:last-child:hover span {
    background: #d4f4ec;
    border-color: #b8ede0;
}

.opt-label:last-child input:checked + span {
    background: #27ae60;
    color: #fff;
    border-color: #27ae60;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Effet hover général (léger grossissement) */
.opt-label:hover span {
    transform: scale(1.05);
}

/* Maintien du grossissement quand sélectionné */
.opt-label input:checked + span {
    transform: scale(1.08);
}

/* --- MODALE --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 24, 32, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-body {
    font-family: 'Aptos', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #57575E;
}

@keyframes modalPop {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- NAVIGATION --- */
.nav-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
}

/* --- ESPACEMENT DES ÉLÉMENTS --- */
#display-test {
    overflow: visible !important;
}

#bloc-title {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 30px !important;
    clear: both !important;
}

#questions-container {
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
    margin-top: 0 !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .dc-tablet-container {
        padding: 30px 20px;
        margin: 10px;
    }

    #p-container.horizons-progress-blocks {
        padding: 15px 10px !important;
        gap: 4px !important;
    }

    .progress-block {
        height: 35px;
    }

    .progress-block > div:last-child {
        font-size: 12px;
    }

    .q-options {
        gap: 4px;
    }

    .opt-label span {
        padding: 12px 6px;
        font-size: 12px;
    }

    .title-dc2 {
        font-size: 20px;
    }

    .btn-main {
        padding: 16px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .dc-tablet-container {
        padding: 20px 15px;
    }

    .opt-label span {
        padding: 10px 4px;
        font-size: 11px;
    }
}
/* Barre de progression simple */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 20px 0 30px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #59abe3 0%, #2271b1 100%);
    width: 0%;
    transition: width 0.4s ease-out;
}

#horizons-modal-title {
    color: #043b5c !important;
    font-weight: 700;
    letter-spacing: -0.3px;
}

#btn-close-horizons-modal {
    background: #043b5c;
    color: #F5F4EB;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Aptos', sans-serif;
    font-weight: 600;
}

/* Styles pour champs en lecture seule (répondants) */
.dc-input[readonly],
.dc-select[disabled] {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

input[type="radio"][onclick*="return false"] + label {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ====================================
   FORMULAIRE RÉPONDANT SIMPLIFIÉ
   ==================================== */

.respondent-type-selector {
    margin-top: 20px;
}

.respondent-type-selector > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.respondent-type-selector > div {
    display: flex;
    gap: 15px;
}

.respondent-type-option {
    flex: 1;
}

.respondent-type-option input[type="radio"] {
    display: none;
}

.respondent-type-label {
    display: block;
    width: 100%;
    padding: 20px;
    background-color: #f1f1f1;
    color: #444;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-family: 'Aptos', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    text-transform: uppercase;
}

.respondent-type-label:hover {
    background-color: #5c97bf;
    color: #ffffff;
    border-color: #5c97bf;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.respondent-type-option input[type="radio"]:checked + .respondent-type-label {
    background-color: #043b5c;
    color: #ffffff;
    border-color: #043b5c;
    box-shadow: 0 5px 15px rgba(4, 59, 92, 0.3);
}

#respondent-type-error {
    font-weight: 500;
    margin-top: 10px;
}
