:root {
    --ins-primary: #1f3c88;
    --ins-primary-dark: #152a61;
    --ins-accent: #f2a900;
    --ins-bg: #f3f5fa;
}

body {
    background: var(--ins-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

.ins-header {
    background: linear-gradient(120deg, var(--ins-primary-dark), var(--ins-primary));
    color: #fff;
    border-bottom: 4px solid var(--ins-accent);
}

.ins-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 3px;
}

.ins-institution { font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.ins-subtitle { opacity: .8; font-size: .85rem; }

.ins-footer { background: #fff; color: #6c757d; border-top: 1px solid #e3e7ef; }

.ins-hero h1 { color: var(--ins-primary-dark); font-weight: 700; }

.ins-card {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(21, 42, 97, .07);
}

.ins-card .card-header {
    background: #fff;
    border-bottom: 1px solid #edf0f6;
    font-weight: 600;
    color: var(--ins-primary-dark);
    border-radius: 12px 12px 0 0;
    padding: .85rem 1.25rem;
}

.ins-card .card-header .bi { color: var(--ins-accent); margin-right: .35rem; }

/* Étapes */
.ins-stepper {
    display: flex;
    gap: .5rem;
    list-style: none;
    padding: 0;
    counter-reset: step;
}

.ins-stepper li {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .85rem;
    background: #fff;
    border-radius: 10px;
    color: #6c757d;
    font-weight: 500;
    font-size: .92rem;
    border: 2px solid transparent;
}

.ins-stepper li span {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e9ecf3;
    font-weight: 700;
}

.ins-stepper li.active { border-color: var(--ins-primary); color: var(--ins-primary-dark); }
.ins-stepper li.active span { background: var(--ins-primary); color: #fff; }
.ins-stepper li.done span { background: #198754; color: #fff; }

@media (max-width: 575.98px) {
    .ins-stepper li { font-size: 0; justify-content: center; }
    .ins-stepper li span { font-size: .9rem; }
}

/* Photo */
.ins-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 180px;
    margin: 0 auto;
    border: 2px dashed #b9c3d8;
    border-radius: 10px;
    background: #f8f9fc;
    color: #8792a8;
    cursor: pointer;
    overflow: hidden;
    text-align: center;
    font-size: .85rem;
}

.ins-photo .bi { font-size: 2rem; }
.ins-photo img { width: 100%; height: 100%; object-fit: cover; }
.is-invalid ~ .invalid-feedback, input.is-invalid + .form-text + .invalid-feedback { display: block; }

.ins-indicatif { max-width: 145px; flex: 0 0 145px; }

.ins-choice-title {
    font-weight: 600;
    color: var(--ins-primary);
    border-left: 3px solid var(--ins-accent);
    padding-left: .5rem;
    margin-bottom: .75rem;
}

/* Champ piège anti-robots */
.ins-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Récapitulatif */
.ins-recap-photo {
    float: right;
    width: 110px;
    height: 132px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 0 1rem 1rem;
}

.ins-recap-title {
    font-weight: 700;
    color: var(--ins-primary-dark);
    border-bottom: 1px solid #edf0f6;
    padding-bottom: .35rem;
    margin-top: .5rem;
}

.ins-recap dt { font-weight: 500; color: #6c757d; }
.ins-recap dd { margin-bottom: .35rem; }

.ins-closed-icon { font-size: 3.5rem; color: var(--ins-accent); }

.ins-numero {
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--ins-primary-dark);
    background: #fff8e1;
    border: 2px dashed var(--ins-accent);
    border-radius: 10px;
    display: inline-block;
    padding: .4rem 1.2rem;
}

@media print {
    .ins-header nav, .ins-footer, .no-print { display: none !important; }
    body { background: #fff; }
    .ins-card { box-shadow: none; border: 1px solid #ccc; }
}
