.formation-hero {
    background: linear-gradient(135deg, #051a0c 0%, #0D5C2E 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.formation-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .12;
}
.formation-hero-content { position: relative; z-index: 1; }
.formation-badge {
    display: inline-block;
    background: #F5C518;
    color: #051a0c;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 6px 20px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.formation-hero h1 {
    color: #fff;
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 800;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
}
.formation-hero p {
    color: rgba(255,255,255,.75);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.formation-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 20px;
}

.detection-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    margin-bottom: 36px;
    border: 1px solid #eef2ef;
}
.detection-card-header {
    background: linear-gradient(135deg, #051a0c 0%, #0D5C2E 100%);
    padding: 30px 36px;
    color: #fff;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.detection-card-header-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(245,197,24,.15);
    border: 2px solid rgba(245,197,24,.4);
    color: #F5C518;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.detection-card-header h2 { margin: 0 0 10px; font-size: 22px; font-weight: 800; }
.detection-card-header .meta { display: flex; flex-wrap: wrap; gap: 18px; }
.detection-card-header .meta-item { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: rgba(255,255,255,.85); }
.detection-card-header .meta-item i { color: #F5C518; }
.detection-card-body { padding: 30px 36px; }
.detection-card-body p { color: #4b5563; line-height: 1.75; margin-bottom: 22px; }
.detection-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.detection-info-item {
    background: #f7faf8;
    border: 1px solid #eef2ef;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.detection-info-item .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; margin-bottom: 6px; font-weight: 700; }
.detection-info-item .value { font-size: 18px; font-weight: 800; color: #0D5C2E; }

.postuler-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #F5C518;
    color: #051a0c;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 14.5px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: .3px;
    transition: background .18s, transform .18s, box-shadow .18s;
    cursor: pointer;
    border: none;
}
.postuler-btn:hover { background: #ffd83d; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(245,197,24,.35); color: #051a0c; text-decoration: none; }
.postuler-btn:disabled,
.postuler-btn[disabled] {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Modal */
.form-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5,26,12,.6);
    backdrop-filter: blur(3px);
    z-index: 99999;
    overflow-y: auto;
    padding: 40px 20px;
}
.form-overlay.active { display: flex; align-items: flex-start; justify-content: center; }
.form-modal {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 700px;
    padding: 36px 40px 40px;
    position: relative;
    animation: slideUp .3s ease;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.form-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: #f3f4f6;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}
.form-modal h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 24px;
    color: #111827;
}
.form-modal h3 i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e8f5ed;
    color: #0D5C2E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    margin: 0 !important;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 0; }
.form-group.full { grid-column: span 2; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s;
    box-sizing: border-box;
    background: #fff;
}
.form-group input:focus,
.form-group textarea:focus { border-color: #0D5C2E; outline: none; }

/* Choix de poste : boutons radio */
.poste-choices { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.poste-choice input[type="radio"] { display: none; }
.poste-choice span {
    display: inline-block;
    padding: 9px 18px;
    border: 1.5px solid #e5e7eb;
    border-radius: 9px;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    transition: all .18s;
    user-select: none;
}
.poste-choice input[type="radio"]:checked + span {
    border-color: #0D5C2E;
    background: #0D5C2E;
    color: #fff;
    font-weight: 700;
}
.poste-choice span:hover { border-color: #0D5C2E; color: #0D5C2E; }
.form-group .error { color: #dc2626; font-size: 12px; margin-top: 4px; }
.form-submit-row { margin-top: 26px; display: flex; gap: 12px; justify-content: flex-end; }
.consent-group { margin-top: 8px; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; color: #4b5563; line-height: 1.5; }
.consent-label input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: #0D5C2E; cursor: pointer; }
.consent-label a { color: #0D5C2E; font-weight: 700; }
.btn-cancel {
    padding: 12px 24px;
    background: #f3f4f6;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #4b5563;
    font-family: inherit;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    border: 1px solid #eef2ef;
}
.empty-state i { font-size: 56px; color: #d1e7d9; margin-bottom: 20px; }
.empty-state h2 { font-size: 22px; color: #374151; margin-bottom: 10px; }
.empty-state p { color: #9ca3af; max-width: 400px; margin: 0 auto; }

.alert-success-banner {
    background: #d4edda;
    color: #155724;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full { grid-column: span 1; }
    .detection-card-header { flex-direction: column; }
    .form-modal { padding: 30px 22px 30px; }
}
