/* style.css - simple, propre et responsive */
:root{
    --card: #ffffff;
    --accent:#4f46e5;
    --text:#e6eef8;
    --muted:#9aa6bd;
    --success:#10b981;
    --danger:#ef4444;
    --glass: rgba(255,255,255,0.03);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

*{box-sizing:border-box}
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

#jobs_before {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem 2rem;
}

#jobs_before h2 {
    text-align: center;
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    color: #112145;
}

#search-bar {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 50px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    max-width: 900px;
    background: white;
    color: black;
}

.search-container {
    text-align: center;
}

#search-bar:focus {
    outline: none;
    border-color: #0f59aa;
    box-shadow: 0 4px 12px rgba(15, 89, 170, 0.3);
}

#jobs_before p {
    text-align: center;
    line-height: 1.6;
    color: #2c2c43;
    font-family: Gotham_Book, serif;
    font-size: 1rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

#jobs {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem 2rem;
}

.btn-small {
    display: none;
}

#apply_title {
    font-size: 1.8rem;
    margin-bottom: 0;
    margin-top: 2rem;
    color: #1a2c56;
    font-family: Avenir_Black, sans-serif;
    text-align: center;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    color: white;
    flex-direction: column;
}

.loader-container p {
    margin-top: 18px;
    font-size: 1.2rem;
    font-weight: 500;
    color: #f1f5f9;
    text-align: center;
}

/* Simple rotating loader */
.loader {
    width: 64px;
    height: 64px;
    border: 6px solid rgba(255,255,255,0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-left: auto;
    margin-right: auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.celebrate h1 {
    font-size: 2.8rem;
    margin-bottom: 0;
    color: #1a2c56;
    font-family: Avenir_Black, sans-serif;
    margin-top: 0.7rem;
    text-align: center;
}

#job-page h1 {
    font-size: 2.8rem;
    margin-bottom: 0;
    color: #1a2c56;
    font-family: Avenir_Black, sans-serif;
    margin-top: 0.7rem;
    text-align: center;
}

#job-page h2 {
    text-align: center;
    margin-top: -0.9rem;
    border-bottom: 0.2rem solid #d9d9d9;
    padding-bottom: 1.7rem;
    font-size: 1.2rem;
    color: #2b4889;
}

#job-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem 2rem;
}

#loader {
    text-align: center;
    color: #2c2c43;
    font-size: 1.5rem;
    margin-top: 10%;
}

.job-card-header {
    display: flex;
    width: 100%;
}

/* cards */
.job-list{display:grid;gap:16px;margin-top:16px}
.job-card{
    background:var(--card);
    padding:16px;
    border-radius:12px;
    box-shadow:0 1px 5px rgba(71, 71, 71, 0.6);
    border:1px solid rgba(255,255,255,0.02);
    display: flex;
    flex-direction: column;
}
.job-card h3 {
    display: flex;
    font-size: 20px;
    align-items: center;
}
.job-time {
    color:var(--muted);
    font-size:14px;
    align-items: center;
    display: flex;
    margin: 0 0 0 1rem;
}

.job-tags {
    margin-top: -5px;
    color:var(--muted);
    font-size:14px;
}

.btn-primary,
.job-card .btn-small,
.job-card .btn-full {
    border: 2px solid #347ed7;
    border-radius: 15px;
    padding: 7px 12px;
    background-color: transparent;
    color: #347ed7;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
    align-items: center;
    width: auto;
    white-space: nowrap;
    align-self: center;
    text-decoration: none;
    margin-left: auto;
}

.btn-primary:hover,
.job-card .btn-small:hover,
.job-card .btn-full:hover {
    background-color: #347ed7;  /* Fill with blue */
    color: white;                /* Text turns white */
}

#addExp {
    color: rgb(15, 89, 170);
    font-weight: bold;
    font-size: 0.9rem;

}

.back-btn {
    padding-top: 2rem;
    align-self: flex-start;
    color: rgb(15, 89, 170);
    font-weight: bold;
    display: inline-block;
    text-decoration: none;
    transition: color 0.3s;
}

#job-page h4 {
    font-size: 1.5rem;
    margin-top: 1rem;
    color: #1a2c56;
    font-weight: bold;
    margin-left: 1rem;
    margin-right: 1rem;
}

#job-page p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #2c2c43;
    font-family: Gotham_Book, sans-serif;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

#job-page li {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2c2c43;
    font-family: Gotham_Book, sans-serif;
    margin: 0.5rem 1.5rem 0 3rem;
}

#job-page ul {
    margin-bottom: 1.5rem;
}

.file-warning {
    font-size: 0.85rem;
    margin-top: 4px;
    color: #ea580c; /* orange-600 */
}

.file-error {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #dc2626; /* red-600 */
}

.file-input-error {
    border-color: #dc2626 !important;
    outline-color: #dc2626 !important;
}

.custom-file-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-file-upload {
    border: 2px dashed #6b7280; /* gray-500 */
    background: #fafafa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.custom-file-upload:hover {
    border-color: #3b82f6; /* blue-500 */
    background: #f0f7ff;
}

.custom-file-upload.dragover {
    border-color: #2563eb; /* blue-600 */
    background: #e8f1ff;
}

.custom-file-upload span {
    color: #374151; /* gray-700 */
    font-size: 0.95rem;
}

.file-list {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #374151;
}

.consent-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 20px 0;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    color: #374151;
}

.consent-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
}

.consent-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 6px;
}


.file-error {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #dc2626;
}

.file-input-error {
    border-color: #dc2626 !important;
}


/* job detail */
.detail {
    margin-top:18px;
    background:var(--glass);
    padding:18px;border-radius:12px;border:1px solid rgba(255,255,255,0.02);
}
.detail h2{margin:0 0 8px}
.detail .meta{color:var(--muted);margin-bottom:12px}

/* form */
.form-card{
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    max-width: 900px;
    box-shadow: 0 1px 10px rgb(2 6 23 / 20%);
    margin: 1rem auto 2rem;
}
.progress{
    height:10px;background:rgba(255,255,255,0.06);border-radius:999px;overflow:hidden;margin-bottom:14px;
}
.progress > .bar{height:100%;width:0%;background:linear-gradient(90deg,var(--accent),#06b6d4);transition:width .35s ease}

/* inputs */
label{display:block;margin:10px 0 6px;font-size:13px;color: #525967;}

input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus,
input[type="text"]:hover, input[type="number"]:hover, textarea:hover, select:hover {
    border: 1px solid #0f59aa;
}

input[type="text"], input[type="number"], textarea, select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgb(12 12 12 / 30%);
    background: transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
    color: #000000;
    outline: none;
    font-size: 14px;
}


textarea{min-height:140px;resize:vertical}
.small-row{display:flex;gap:12px}
.small-row > *{flex:1}

/* dynamic experiences list */
.experience{display:flex;gap:8px;margin-bottom:8px}
.experience input{
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgb(12 12 12 / 30%);
    background: transparent;
    color: #000000;
    outline: none;
    font-size: 14px;
    transition: 0.3s ease;
}

.experience input:hover,
.experience input:focus{
    border: 1px solid #0f59aa;
}

/* buttons */
.btn-ghost{
    background:transparent;
    border:1px solid rgba(255,255,255,0.06);
    padding:8px 12px;
    border-radius:8px;
    color:var(--text);
    text-decoration:none;
    cursor:pointer
}

/*.btn-primary{*/
/*    background:var(--accent);*/
/*    color:white;*/
/*    padding:10px 14px;*/
/*    border-radius:10px;*/
/*    border:none;*/
/*    cursor:pointer;*/
/*    font-weight:600*/
/*}*/

.btn-danger{
    background:var(--danger);
    color:white;
    padding:8px 10px;
    border-radius:8px;
    border:none;
    transition: 0.3s ease;
    cursor:pointer;
    font-family: Avenir_Black, sans-serif;
}

.btn-danger:hover{
    background: #ba3737;
}

/* small text */
.small{
    font-size:1.5rem;
    text-align: center;
    color: #2c2c43;
    margin-top:8px
}

/* responsiveness */
@media (max-width:600px){
    .small-row{flex-direction:column}
}

@media (max-width: 650px) {
    .btn-small {
        display: inline-flex;
        margin-left: auto;
        margin-top: 0.8rem;
        margin-right: auto;
    }
    .btn-full {
        display: none;
    }


    #job-page h1 {
        font-size: 2rem;
    }
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    position: relative;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.step-indicator .circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #d1d5db;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 6px;
    transition: 0.25s;
}

.step-indicator.active .circle {
    background: #2563eb; /* Blue */
    color: white;
    transform: scale(1.1);
}

.step-indicator.completed .circle {
    background: #16a34a; /* Green */
    color: white;
}

.progress-steps .line {
    flex-grow: 1;
    height: 4px;
    background: #d1d5db;
    margin: 0 10px;
}

.step-invalid {
    border: 1px solid #ef4444 !important;
    background: #ffeaea !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 4px;
}
