/* ═══════════════════════════════════════════════════════
   Home Location – Formulaire de Candidature
   Front-end styles (scoped to #hl-form-wrap)
═══════════════════════════════════════════════════════ */

#hl-form-wrap {
    --hl-primary:      #1a3a5c;
    --hl-primary-dark: #0f2236;
    --hl-accent:       #c8a461;
    --hl-accent-dark:  #a68545;
    --hl-accent-light: #e0b877;
    --hl-success:      #4caf50;
    --hl-error:        #f44336;
    --hl-gray:         #f5f5f5;
    --hl-border:       #ddd;
    --hl-text:         #1a1a1a;
    --hl-text-muted:   #666;
    --hl-white:        #ffffff;
    --hl-shadow-sm:    0 2px 4px rgba(0,0,0,.08);
    --hl-shadow-md:    0 4px 12px rgba(0,0,0,.12);
    --hl-radius:       8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--hl-text);
    line-height: 1.6;
}

/* ── Header ─────────────────────────────────────────── */
.hl-header { background: linear-gradient(135deg, var(--hl-primary) 0%, var(--hl-primary-dark) 100%); color: #fff; padding: 1.5rem 1rem; box-shadow: var(--hl-shadow-md); }
.hl-header-content { max-width: 960px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hl-header-title { font-size: 1.6rem; font-weight: 700; }
.hl-header-title a { color: inherit; text-decoration: none; }
.hl-header-title a:hover { text-decoration: underline; }
.hl-header-subtitle { font-size: .875rem; opacity: .9; margin-top: .2rem; }
.hl-lang-toggle { display: flex; gap: .4rem; background: rgba(255,255,255,.1); padding: .4rem; border-radius: 6px; }
.hl-lang-btn { padding: .4rem .9rem; background: transparent; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: .875rem; font-weight: 600; transition: background .2s; }
.hl-lang-btn.active { background: var(--hl-accent); }
.hl-lang-btn:hover:not(.active) { background: rgba(255,255,255,.2); }

/* ── Container ──────────────────────────────────────── */
.hl-container { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* ── Barre de progression ────────────────────────────── */
.hl-progress-container { background: var(--hl-white); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--hl-shadow-sm); }
.hl-progress-bar { width: 100%; height: 6px; background: var(--hl-gray); border-radius: 3px; margin-bottom: 1.25rem; overflow: hidden; }
.hl-progress-fill { height: 100%; background: linear-gradient(90deg, var(--hl-accent) 0%, var(--hl-accent-light) 100%); width: 0%; transition: width .4s ease; border-radius: 3px; }
.hl-progress-dots { display: flex; justify-content: space-between; gap: .5rem; }
.hl-progress-dot { flex: 1; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform .2s; }
.hl-progress-dot:hover { transform: scale(1.05); }
.hl-dot { width: 38px; height: 38px; border-radius: 50%; background: var(--hl-white); border: 3px solid var(--hl-border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--hl-text-muted); margin-bottom: .4rem; transition: all .3s; }
.hl-progress-dot.active .hl-dot { background: var(--hl-accent); color: #fff; border-color: var(--hl-accent); box-shadow: 0 0 0 4px rgba(200,164,97,.2); }
.hl-progress-dot.completed .hl-dot { background: var(--hl-success); color: #fff; border-color: var(--hl-success); }
.hl-dot-label { font-size: .7rem; color: var(--hl-text-muted); text-align: center; font-weight: 600; }
.hl-progress-dot.active .hl-dot-label { color: var(--hl-accent); }
.hl-progress-dot.completed .hl-dot-label { color: var(--hl-success); }

/* ── Sections de formulaire ─────────────────────────── */
.hl-form-section { background: var(--hl-white); border-radius: 12px; padding: 2rem 2.5rem; box-shadow: var(--hl-shadow-sm); margin-bottom: 1.5rem; display: none; }
.hl-form-section.active { display: block; animation: hlSlideIn .3s ease; }
@keyframes hlSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hl-section-title { font-size: 1.4rem; font-weight: 700; color: var(--hl-primary); margin-bottom: .4rem; }
.hl-section-subtitle { font-size: .875rem; color: var(--hl-text-muted); margin-bottom: 1.75rem; }

/* ── Layout ─────────────────────────────────────────── */
.hl-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.hl-form-group { display: flex; flex-direction: column; }
.hl-form-group.full { grid-column: 1 / -1; }
.hl-form-group label { font-weight: 600; font-size: .9rem; margin-bottom: .45rem; color: var(--hl-text); display: flex; align-items: center; gap: .4rem; }
.hl-req { color: var(--hl-error); }

/* ── Inputs ─────────────────────────────────────────── */
#hl-form-wrap input[type="text"],
#hl-form-wrap input[type="email"],
#hl-form-wrap input[type="tel"],
#hl-form-wrap input[type="number"],
#hl-form-wrap input[type="date"],
#hl-form-wrap select,
#hl-form-wrap textarea {
    width: 100%; padding: .7rem 1rem; border: 2px solid var(--hl-border); border-radius: var(--hl-radius);
    font-size: 1rem; font-family: inherit; color: var(--hl-text); background: var(--hl-white);
    transition: border-color .25s, box-shadow .25s;
}
#hl-form-wrap input:focus, #hl-form-wrap select:focus, #hl-form-wrap textarea:focus {
    outline: none; border-color: var(--hl-accent); box-shadow: 0 0 0 4px rgba(200,164,97,.12);
}
#hl-form-wrap textarea { min-height: 110px; resize: vertical; }
#hl-form-wrap input.hl-error, #hl-form-wrap select.hl-error, #hl-form-wrap textarea.hl-error {
    border-color: var(--hl-error) !important; box-shadow: 0 0 0 3px rgba(244,67,54,.15) !important;
}

/* ── Chips ──────────────────────────────────────────── */
.hl-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.hl-chip { padding: .55rem 1.1rem; border: 2px solid var(--hl-border); background: var(--hl-white); border-radius: 24px; cursor: pointer; font-size: .875rem; font-weight: 500; transition: all .2s; user-select: none; color: var(--hl-text); }
.hl-chip:hover { border-color: var(--hl-accent); }
.hl-chip.active { background: var(--hl-accent); color: #fff; border-color: var(--hl-accent); }
.hl-chips.hl-error { border: 2px solid var(--hl-error); border-radius: var(--hl-radius); padding: .4rem; }

/* ── Toggle switch ──────────────────────────────────── */
.hl-toggle-switch { display: flex; align-items: center; gap: .75rem; }
.hl-toggle-control { position: relative; display: inline-block; width: 48px; height: 26px; }
.hl-toggle-input { opacity: 0; width: 0; height: 0; }
.hl-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--hl-border); border-radius: 34px; transition: .3s; }
.hl-toggle-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.hl-toggle-input:checked + .hl-toggle-slider { background: var(--hl-accent); }
.hl-toggle-input:checked + .hl-toggle-slider:before { transform: translateX(22px); }

/* ── Toggle content ─────────────────────────────────── */
.hl-toggle-content { display: none; margin-top: .75rem; padding: 1.25rem; background: var(--hl-gray); border-radius: var(--hl-radius); }
.hl-toggle-content.visible { display: block; animation: hlSlideIn .3s ease; }

/* ── Uploads ────────────────────────────────────────── */
.hl-upload-section { margin-bottom: 1.5rem; }
.hl-upload-label { font-weight: 600; font-size: .95rem; margin-bottom: .5rem; display: flex; align-items: center; gap: .5rem; }
.hl-upload-box { border: 2px dashed var(--hl-border); border-radius: var(--hl-radius); padding: 1.75rem; text-align: center; cursor: pointer; transition: all .25s; background: rgba(245,245,245,.5); }
.hl-upload-box:hover, .hl-upload-box.dragover { border-color: var(--hl-accent); background: rgba(200,164,97,.06); }
.hl-upload-box.hl-error { border-color: var(--hl-error); }
.hl-upload-icon { font-size: 2rem; margin-bottom: .5rem; }
.hl-upload-text { font-weight: 600; margin-bottom: .2rem; }
.hl-upload-sub { font-size: .8rem; color: var(--hl-text-muted); }
.hl-file-input { display: none; }
.hl-file-list { margin-top: .75rem; }
.hl-file-item { display: flex; justify-content: space-between; align-items: center; padding: .6rem .75rem; background: var(--hl-gray); border-radius: 6px; margin-bottom: .4rem; font-size: .875rem; gap: .5rem; }
.hl-file-name { flex: 1; word-break: break-word; }
.hl-file-remove { background: var(--hl-error); color: #fff; border: none; padding: .3rem .7rem; border-radius: 4px; cursor: pointer; font-size: .8rem; transition: background .2s; flex-shrink: 0; }
.hl-file-remove:hover { background: #d32f2f; }

/* ── Récapitulatif ──────────────────────────────────── */
.hl-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.hl-summary-card { background: var(--hl-gray); border-radius: var(--hl-radius); padding: 1.1rem; border-left: 4px solid var(--hl-accent); }
.hl-summary-card-title { font-size: .8rem; font-weight: 700; color: var(--hl-text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .35rem; }
.hl-summary-card-content { font-size: .95rem; color: var(--hl-text); font-weight: 500; word-break: break-word; }

/* ── Consentements ──────────────────────────────────── */
.hl-consent-group { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.hl-consent-item { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem 1rem; background: var(--hl-gray); border-radius: var(--hl-radius); cursor: pointer; transition: background .2s; }
.hl-consent-item:hover { background: #ebebeb; }
#hl-form-wrap input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--hl-accent); flex-shrink: 0; margin-top: 2px; }
.hl-consent-text { flex: 1; font-size: .875rem; line-height: 1.5; }

/* ── Accordéon ──────────────────────────────────────── */
.hl-accordion { border: 1px solid var(--hl-border); border-radius: var(--hl-radius); overflow: hidden; margin-bottom: 1.5rem; }
.hl-accordion-header { background: var(--hl-gray); padding: .9rem 1.25rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; user-select: none; transition: background .2s; }
.hl-accordion-header:hover { background: #ebebeb; }
.hl-acc-toggle { transition: transform .3s; font-size: 1.1rem; }
.hl-acc-toggle.open { transform: rotate(180deg); }
.hl-accordion-content { display: none; padding: 1.25rem 1.5rem; border-top: 1px solid var(--hl-border); }
.hl-accordion-content.open { display: block; }
.hl-acc-text { font-size: .875rem; line-height: 1.8; color: var(--hl-text-muted); }
.hl-acc-text h3 { color: var(--hl-primary); margin: 1.25rem 0 .5rem; font-size: .95rem; }
.hl-acc-text h3:first-child { margin-top: 0; }

/* ── Boutons ────────────────────────────────────────── */
.hl-btn-group { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.hl-btn-primary, .hl-btn-secondary {
    padding: .75rem 1.5rem; border: none; border-radius: var(--hl-radius); font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: all .25s; text-transform: uppercase; letter-spacing: .5px; flex: 1;
}
.hl-btn-primary { background: linear-gradient(135deg, var(--hl-accent) 0%, var(--hl-accent-dark) 100%); color: #fff; }
.hl-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--hl-shadow-md); }
.hl-btn-secondary { background: var(--hl-white); color: var(--hl-primary); border: 2px solid var(--hl-primary); }
.hl-btn-secondary:hover:not(:disabled) { background: var(--hl-primary); color: #fff; }
.hl-btn-primary:disabled, .hl-btn-secondary:disabled { opacity: .45; cursor: not-allowed; }

/* ── Bannière document ──────────────────────────────── */
.hl-doc-reminder { background: linear-gradient(135deg, #fff3e0, #ffe0b2); border-left: 4px solid var(--hl-accent); padding: .9rem 1.1rem; border-radius: 0 var(--hl-radius) var(--hl-radius) 0; margin-bottom: 1.5rem; font-size: .875rem; line-height: 1.5; }

/* ── Modal succès ───────────────────────────────────── */
.hl-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99999; justify-content: center; align-items: center; }
.hl-modal-overlay.active { display: flex; }
.hl-modal-box { background: var(--hl-white); border-radius: 16px; padding: 2.5rem; max-width: 440px; width: 92%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.28); animation: hlModalIn .3s ease; }
@keyframes hlModalIn { from { opacity: 0; transform: scale(.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.hl-modal-icon { font-size: 3.5rem; margin-bottom: .75rem; }
.hl-modal-box h2 { color: var(--hl-success); margin-bottom: .5rem; font-size: 1.3rem; }
.hl-modal-box p { color: var(--hl-text-muted); font-size: .95rem; }
.hl-modal-btn { margin-top: 1.5rem; padding: .7rem 2rem; background: var(--hl-accent); color: #fff; border: none; border-radius: var(--hl-radius); font-size: 1rem; font-weight: 700; cursor: pointer; transition: background .2s; }
.hl-modal-btn:hover { background: var(--hl-accent-dark); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 680px) {
    .hl-form-section { padding: 1.25rem; }
    .hl-form-row { grid-template-columns: 1fr; }
    .hl-btn-group { flex-direction: column; }
    .hl-progress-dots { flex-wrap: wrap; gap: .75rem; }
    .hl-progress-dot { flex: 0 1 auto; }
    .hl-header-content { flex-direction: column; align-items: flex-start; }
}
