/* ===================================================
   POLY-UNIV MED - Inscriptions en ligne
   Design inspiré de polyunivmed.com
   =================================================== */

:root {
    --primary: #1a4b9c;
    --primary-light: #2560c4;
    --primary-dark: #0e2f6a;
    --accent: #e30000;
    --accent-light: #ff1a1a;
    --light-bg: #f4f6f9;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
    --white: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    margin: 0;
}

/* ===== NAVBAR ===== */
.navbar-brand img { height: 50px; }
.navbar-main {
    background:  #f6f7f8 !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    padding: 0;
}
.navbar-main .nav-link {
    color: #212529 !important;
    padding: 20px 15px !important;
    font-weight: 500;
    transition: all 0.3s;
}
.navbar-main .nav-link:hover {
    color: var(--accent) !important;
    background: rgba(255,255,255,0.05);
}
.navbar-brand-text {
    font-size: 20px;
    font-weight: 700;
    color: white !important;
    line-height: 1.2;
}
.navbar-brand-text span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
}

/* ===== HERO BANNER ===== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.hero-banner h1 {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.hero-banner p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}
.hero-banner .badge-annee {
    background: var(--accent);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

/* ===== FORM CARD ===== */
.form-section {
    margin-top: -40px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}
.card-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    margin-bottom: 25px;
}
.card-form-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 18px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.card-form-header .step-num {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.card-form-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.card-form-body { padding: 25px; }

/* ===== FORM ELEMENTS ===== */
.form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 3px; }
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.3s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(40,86,163,0.15);
    outline: none;
}
.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--danger);
}
.input-group-text {
    background: var(--primary);
    color: white;
    border: 1.5px solid var(--primary);
    border-radius: 8px 0 0 8px;
}

/* ===== FILE UPLOAD ===== */
.upload-zone {
    border: 2px dashed #b8c8e8;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8faff;
    position: relative;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-light);
    background: #eef3ff;
}
.upload-zone input[type="file"] {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.upload-zone .upload-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 8px;
}
.upload-zone .upload-text { color: var(--text-muted); font-size: 13px; }
.upload-zone .upload-text strong { color: var(--primary); }
.upload-preview {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: #f0f5ff;
    border-radius: 6px;
    font-size: 13px;
    color: var(--primary);
}

/* ===== PROGRESS BAR ===== */
.progress-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 0;
}
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 150px;
}
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #dee2e6;
    z-index: 0;
}
.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dee2e6;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}
.step-item.active .step-circle { background: var(--primary); color: white; }
.step-item.done .step-circle { background: var(--success); color: white; }
.step-label { font-size: 11px; color: var(--text-muted); margin-top: 5px; text-align: center; }
.step-item.active .step-label { color: var(--primary); font-weight: 600; }

/* ===== SUBMIT BUTTON ===== */
.btn-submit {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(227,0,0,0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227,0,0,0.5);
    color: white;
}
.btn-primary-custom {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-primary-custom:hover {
    background: var(--primary-light);
    color: white;
}

/* ===== ALERTS ===== */
.alert-custom {
    border: none;
    border-left: 4px solid;
    border-radius: 0 8px 8px 0;
    padding: 15px 20px;
}
.alert-custom.alert-success { border-color: var(--success); background: #f0fff4; }
.alert-custom.alert-danger { border-color: var(--danger); background: #fff5f5; }
.alert-custom.alert-info { border-color: var(--primary-light); background: #f0f5ff; }

/* ===== SIDEBAR INFO ===== */
.info-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}
.info-card-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.info-card-body { padding: 20px; }
.filiere-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.filiere-item:last-child { border-bottom: none; }
.filiere-item .filiere-icon {
    width: 32px;
    height: 32px;
    background: #eef3ff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.filiere-name { font-weight: 600; font-size: 13px; color: var(--primary); }
.filiere-subs { font-size: 11px; color: var(--text-muted); }

/* ===== SUCCESS PAGE ===== */
.success-box {
    background: white;
    border-radius: 12px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0,0,0,0.12);
}
.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 5px 20px rgba(40,167,69,0.4);
}
.ref-box {
    background: #f0f5ff;
    border: 2px dashed var(--primary-light);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}
.ref-box .ref-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
}
footer a { color: var(--accent); text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-banner h1 { font-size: 1.6rem; }
    .card-form-body { padding: 18px; }
    .progress-steps { gap: 0; }
    .step-label { font-size: 10px; }
}
