/* ============================================================
   INSCRIPTION.CSS — Styles propres à la page d'inscription
   Miyou Kindergarten de Jean-Paul II
   ============================================================ */

/* ── BACKGROUND BLOBS ── */
.bg-blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-blobs .blob { opacity: .11; filter: blur(80px); }
.bg-blobs .blob-1 { width: 520px; height: 520px; background: var(--primary); top: -120px; right: -120px; }
.bg-blobs .blob-2 { width: 420px; height: 420px; background: var(--secondary); bottom: -100px; left: -100px; animation-delay: -5s; }
.bg-blobs .blob-3 { width: 280px; height: 280px; background: var(--accent-yellow); top: 45%; left: 55%; animation-delay: -9s; }

/* ── PAGE LAYOUT ── */
.insc-page {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 44px 20px 80px;
}

/* ── PAGE HEADER ── */
.page-header {
    text-align: center;
    margin-top: 80px;
    margin-bottom: 40px;
    animation: fadeUp .6s ease both;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-glow);
    border: 1.5px solid rgba(255, 0, 232, .22);
    padding: 5px 18px;
    border-radius: var(--radius-xl);
    font-size: .82rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 18px;
    letter-spacing: .4px;
}

.page-title {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.page-title .hl {
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle { color: var(--dark-soft); font-size: 1rem; max-width: 500px; margin: 0 auto; }

/* ── STEPS INDICATOR ── */
.steps-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    animation: fadeUp .6s .1s ease both;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 19px;
    left: calc(50% + 21px);
    width: calc(100% - 16px);
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.step-item.done:not(:last-child)::after {
    background: linear-gradient(90deg, var(--success), var(--primary));
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .85rem;
    border: 2.5px solid var(--gray-200);
    background: var(--light);
    color: var(--dark-soft);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.step-item.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 5px var(--primary-glow);
}

.step-item.done .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.step-label {
    font-size: .7rem;
    font-weight: 800;
    color: var(--dark-soft);
    text-align: center;
    max-width: 80px;
    line-height: 1.3;
}

.step-item.active .step-label { color: var(--primary-dark); }
.step-item.done .step-label   { color: var(--success); }
.step-line { width: 52px; height: 2px; background: var(--gray-200); flex-shrink: 0; margin-bottom: 26px; }

/* ── FORM CARD ── */
.form-card {
    background: var(--light);
    border-radius: var(--radius-lg);
    border: 1.5px solid rgba(255, 0, 232, .09);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: fadeUp .6s .2s ease both;
}

/* PROGRESS BAR */
.progress-wrap { height: 4px; background: var(--gray-200); }

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-purple));
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

/* FORM SECTION */
.form-section { padding: 34px 38px; }

@keyframes fadeSection {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* SECTION HEADER */
.f-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1.5px solid rgba(255, 0, 232, .08);
}

.f-section-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.icon-enfant { background: linear-gradient(135deg, #FFE66D, #FF9F43); }
.icon-resp1  { background: linear-gradient(135deg, var(--primary), var(--accent-purple)); }
.icon-resp2  { background: linear-gradient(135deg, var(--secondary), #2d9cdb); }
.icon-docs   { background: linear-gradient(135deg, #A29BFE, #6c5ce7); }

.f-section-header h2 { font-size: 1.25rem; font-weight: 800; color: var(--dark); }
.f-section-header p  { font-size: .8rem; color: var(--dark-soft); margin-top: 2px; }

/* ── FORM GRID ── */
.fg   { display: grid; gap: 18px; }
.c2   { grid-template-columns: 1fr 1fr; }
.s2   { grid-column: span 2; }

/* ── FIELDS ── */
.field { display: flex; flex-direction: column; gap: 5px; }

.field label {
    font-size: .83rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 5px;
}

.req { color: var(--primary); font-size: .95rem; line-height: 1; }

.optional-tag {
    font-size: .68rem;
    color: var(--dark-soft);
    background: #f0e6ff;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    margin-left: 4px;
}

/* INPUTS */
.fw { position: relative; }

.fw input, .fw select, .fw textarea,
.field > input, .field > select, .field > textarea {
    width: 100%;
    padding: 11px 15px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-200);
    background: #fafafa;
    font-family: 'Nunito', sans-serif;
    font-size: .92rem;
    color: var(--dark);
    transition: var(--transition);
    outline: none;
    appearance: none;
}

.fw select, .field > select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a4a6a' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 38px;
}

.fw input:focus, .fw select:focus, .fw textarea:focus,
.field > input:focus, .field > select:focus, .field > textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* VALID STATE */
.field.valid .fw input,
.field.valid .fw select,
.field.valid > input,
.field.valid > select,
.field.valid > textarea {
    border-color: var(--success);
    background: var(--success-bg);
}

.field.valid .fw input:focus,
.field.valid .fw select:focus {
    box-shadow: 0 0 0 4px rgba(0, 200, 150, .15);
}

/* INVALID STATE */
.field.invalid .fw input,
.field.invalid .fw select,
.field.invalid > input,
.field.invalid > select,
.field.invalid > textarea {
    border-color: var(--error);
    background: var(--error-bg);
}

.field.invalid .fw input:focus,
.field.invalid .fw select:focus {
    box-shadow: 0 0 0 4px rgba(255, 71, 87, .14);
}

/* STATUS ICON */
.si {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .9rem;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
}

.fw.has-si input, .fw.has-si select { padding-right: 40px; }
.field.valid .si, .field.invalid .si { opacity: 1; }

/* ERROR MESSAGE */
.ferr {
    font-size: .76rem;
    color: var(--error);
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 4px;
}

.field.invalid .ferr { display: flex; }

/* ── RADIO BUTTONS ── */
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-opt   { cursor: pointer; }
.radio-opt input { display: none; }

.radio-btn {
    display: block;
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    border: 2px solid var(--gray-200);
    font-size: .86rem;
    font-weight: 700;
    color: var(--dark-soft);
    background: #fafafa;
    cursor: pointer;
    transition: var(--transition);
}

.radio-opt input:checked + .radio-btn {
    border-color: var(--primary);
    background: var(--primary-glow);
    color: var(--primary-dark);
}

.radio-opt:hover .radio-btn { border-color: var(--primary-light); }
.field.invalid .radio-btn   { border-color: var(--error) !important; background: var(--error-bg) !important; }

.field.valid input[type="radio"]:checked + .radio-btn {
    border-color: var(--success);
    background: var(--success-bg);
    color: #007a5c;
}

/* ── CHECKBOX ── */
.cb-field {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
}

.cb-field input { display: none; }

.cb-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--gray-200);
    background: #fafafa;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-top: 2px;
}

.cb-field input:checked + .cb-box { background: var(--primary); border-color: var(--primary); }
.cb-field input:checked + .cb-box::after { content: '✓'; font-size: .78rem; color: #fff; font-weight: 900; }
.cb-text { font-size: .86rem; color: var(--dark-soft); line-height: 1.5; }
.cb-text a { color: var(--primary); text-decoration: none; font-weight: 800; }

/* ── UPLOAD ZONES ── */
.upload-zone {
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafafa;
}

.upload-zone:hover { border-color: var(--primary); background: var(--primary-glow); }
.upload-zone input { display: none; }
.upload-ico   { font-size: 1.8rem; margin-bottom: 6px; }
.upload-txt   { font-size: .82rem; color: var(--dark-soft); font-weight: 700; }
.upload-txt span { color: var(--primary); text-decoration: underline; }
.upload-sub   { font-size: .72rem; color: var(--dark-soft); margin-top: 3px; }
.upload-name  { font-size: .78rem; font-weight: 800; color: var(--success); margin-top: 6px; min-height: 16px; }

/* ── NOTE BOX ── */
.note-box {
    background: var(--primary-glow);
    border: 1.5px solid rgba(255, 0, 232, .18);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: .83rem;
    color: var(--primary-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.form-nav {
    padding: 20px 38px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.f-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius-xl);
    font-family: 'Nunito', sans-serif;
    font-size: .92rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    letter-spacing: .3px;
    text-decoration: none;
}

.f-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 0, 232, .32);
}

.f-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255, 0, 232, .42); }
.f-btn-primary:active { transform: translateY(0); }
.f-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.f-btn-green {
    background: linear-gradient(135deg, var(--success), #00a07a) !important;
    box-shadow: 0 4px 20px rgba(0, 200, 150, .32) !important;
}

.f-btn-green:hover { box-shadow: 0 8px 28px rgba(0, 200, 150, .42) !important; }

/* SPINNER */
.spinner {
    width: 17px;
    height: 17px;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}

.f-btn-loading .spinner  { display: block; }
.f-btn-loading .btn-lbl  { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── SUCCESS SCREEN ── */
.success-screen { display: none; text-align: center; padding: 56px 38px; animation: fadeUp .5s ease both; }
.success-screen.show { display: block; }

.success-anim {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #00a07a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    margin: 0 auto 22px;
    box-shadow: 0 8px 28px rgba(0, 200, 150, .35);
    animation: bounceIn .6s cubic-bezier(.68, -.55, .265, 1.55) both;
}

@keyframes bounceIn {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-screen h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 10px; }
.success-screen p  { color: var(--dark-soft); max-width: 390px; margin: 0 auto 24px; }

.success-ref {
    display: inline-block;
    background: var(--primary-glow);
    border: 1.5px solid rgba(255, 0, 232, .22);
    padding: 7px 20px;
    border-radius: var(--radius-xl);
    font-weight: 900;
    font-size: .88rem;
    color: var(--primary-dark);
    margin-bottom: 26px;
}

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: #fff;
    padding: 11px 22px;
    border-radius: var(--radius-xl);
    font-size: .85rem;
    font-weight: 800;
    z-index: 9999;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90vw;
}

.toast.show   { transform: translateX(-50%) translateY(0); }
.toast.terror { background: var(--error); }
.toast.tok    { background: var(--success); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE INSCRIPTION ── */
@media (max-width: 680px) {
    .form-section { padding: 22px 18px; }
    .form-nav     { padding: 14px 18px 26px; flex-direction: column-reverse; }
    .form-nav .f-btn { width: 100%; justify-content: center; }
    .c2 { grid-template-columns: 1fr; }
    .s2 { grid-column: span 1; }
    .step-label { display: none; }
    .step-line  { width: 28px; }
    .success-screen { padding: 40px 20px; }
}

@media (max-width: 400px) { .insc-page { padding: 24px 14px 60px; } }
