/* ── Variables & Orange theme override ─────────────────── */
:root {
    --dpph-primary:      #E86A00;

    /* Bootstrap primary subtle overrides (orange tint) */
    --bs-primary-bg-subtle:     #FDEBD4;
    --bs-primary-border-subtle: #F5A96A;
    --bs-primary-text-emphasis: #7A3800;
    --dpph-primary-rgb:  232, 106, 0;
    --dpph-hover:        #C05500;
    --dpph-light:        #FFF3E8;
    --dpph-success:      #198754;
    --dpph-warning:      #fd7e14;

    /* Bootstrap CSS variable overrides */
    --bs-primary:              #E86A00;
    --bs-primary-rgb:          232, 106, 0;
    --bs-link-color:           #E86A00;
    --bs-link-color-rgb:       232, 106, 0;
    --bs-link-hover-color:     #C05500;
    --bs-link-hover-color-rgb: 192, 85, 0;
}

/* Buttons */
.btn-primary {
    --bs-btn-bg:                  #E86A00;
    --bs-btn-border-color:        #E86A00;
    --bs-btn-hover-bg:            #C05500;
    --bs-btn-hover-border-color:  #C05500;
    --bs-btn-active-bg:           #A04800;
    --bs-btn-active-border-color: #A04800;
    --bs-btn-disabled-bg:         #E86A00;
    --bs-btn-disabled-border-color: #E86A00;
    color: #fff;
}
.btn-outline-primary {
    --bs-btn-color:               #E86A00;
    --bs-btn-border-color:        #E86A00;
    --bs-btn-hover-bg:            #E86A00;
    --bs-btn-hover-border-color:  #E86A00;
    --bs-btn-hover-color:         #fff;
    --bs-btn-active-bg:           #C05500;
    --bs-btn-active-border-color: #C05500;
    --bs-btn-active-color:        #fff;
}

/* Utility classes */
.text-primary   { color: #E86A00 !important; }
.bg-primary     { background-color: #E86A00 !important; }
.border-primary { border-color: #E86A00 !important; }

/* Form focus rings */
.form-control:focus,
.form-select:focus {
    border-color: #E86A00;
    box-shadow: 0 0 0 .25rem rgba(232, 106, 0, .25);
}
.form-check-input:checked {
    background-color: #E86A00;
    border-color: #E86A00;
}

/* Progress */
.progress-bar { background-color: #E86A00; }

/* Navbar */
.navbar.bg-primary { background-color: #E86A00 !important; }
.navbar-dark .nav-link:focus,
.navbar-dark .nav-link:hover { color: rgba(255,255,255,.9); }

/* Badges */
.badge.bg-primary { background-color: #E86A00 !important; }

/* Nav pills */
.nav-pills .nav-link.active { background-color: #E86A00; }

/* Links (unclassed) */
a:not([class]):not([href^="#"]) { color: #E86A00; }
a:not([class]):not([href^="#"]):hover { color: #C05500; }

/* ── Global ─────────────────────────────────────────── */
body { font-family: 'Segoe UI', system-ui, sans-serif; background-color: #f8f9fa; }

/* ── Responsive tables ──────────────────────────────── */
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ── Wizard de candidature ──────────────────────────── */
.wizard-steps {
    display: flex;
    counter-reset: step;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: .25rem;
}
.wizard-step {
    flex: 1;
    min-width: 60px;
    text-align: center;
    position: relative;
    font-size: .75rem;
    color: #6c757d;
}
.wizard-step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    font-weight: 600;
    margin: 0 auto .4rem;
    position: relative;
    z-index: 1;
}
.wizard-step::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: calc(50% + 1rem);
    width: calc(100% - 2rem);
    height: 2px;
    background: #dee2e6;
}
.wizard-step:last-child::after { display: none; }
.wizard-step.active::before { background: #E86A00; color: #fff; }
.wizard-step.done::before   { background: var(--dpph-success); color: #fff; content: '✓'; }

/* ── Statut dossier ─────────────────────────────────── */
.statut-timeline { list-style: none; padding: 0; }
.statut-timeline li {
    padding: .5rem 0 .5rem 2rem;
    border-left: 2px solid #dee2e6;
    position: relative;
}
.statut-timeline li::before {
    content: '';
    position: absolute;
    left: -.45rem; top: .75rem;
    width: .7rem; height: .7rem;
    border-radius: 50%;
    background: #dee2e6;
}
.statut-timeline li.done    { border-left-color: var(--dpph-success); }
.statut-timeline li.done::before { background: var(--dpph-success); }
.statut-timeline li.current::before { background: #E86A00; }

/* ── Upload / drop zone ─────────────────────────────── */
.drop-zone {
    border: 2px dashed #ced4da;
    border-radius: .5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.drop-zone:hover,
.drop-zone.dragover {
    border-color: #E86A00;
    background: #FFF3E8;
}

/* ── Responsive helpers ─────────────────────────────── */
@media (max-width: 575.98px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    h1.h3      { font-size: 1.2rem; }
    .btn       { font-size: .875rem; }
    .btn-lg    { font-size: .925rem; padding: .5rem 1.25rem; }
    .card-body { padding: 1rem !important; }

    /* Hero */
    .display-5 { font-size: 1.8rem !important; }
    .lead      { font-size: .95rem; }
    .py-5      { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }

    /* Wizard steps: hide labels, let circles fill evenly */
    .wizard-step-label { display: none; }
    .wizard-step-item  { min-width: 0 !important; }

    /* Candidat dashboard: dossier meta row */
    .dossier-meta       { flex-wrap: wrap !important; row-gap: .4rem; }
    .dossier-meta > div { margin-left: 0 !important; }
}

/* Wizard step label — block by default (sm+) */
.wizard-step-label { display: block; }

/* Candidat dashboard: dossier meta row base */
.dossier-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ── Main container: avoid edge-to-edge on very wide screens ─ */
@media (min-width: 1400px) {
    main.container { max-width: 1140px; }
}
