:root {
    --green: #176a3d;
    --green-light: #2f9e60;
    --green-dark: #0d3f24;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f4f6f5;
    --card: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(13, 63, 36, .08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(600px 300px at 85% -50px, rgba(23, 106, 61, .12), transparent 70%),
        radial-gradient(500px 300px at -50px 100%, rgba(13, 63, 36, .08), transparent 70%),
        var(--bg);
    min-height: 100vh;
}

a {
    text-decoration: none;
}

.page {
    max-width: 620px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Header ---------- */

.header {
    padding: 8px 4px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 56px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(13, 63, 36, .3));
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--green-dark);
    letter-spacing: .2px;
}

.brand-sub {
    font-size: .85rem;
    font-weight: 600;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ---------- Carte principale ---------- */

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
    overflow: hidden;
}

.step {
    display: none;
}

.step.is-active {
    display: block;
    animation: stepIn .35s ease both;
}

.step--center {
    text-align: center;
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 6px;
}

.subtitle {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 24px;
}

/* ---------- Choix (etape 1) ---------- */

.choices {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.choice {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.choice:hover,
.choice:focus-visible {
    border-color: var(--green);
    box-shadow: 0 8px 24px rgba(23, 106, 61, .15);
    transform: translateY(-2px);
    outline: none;
}

.choice-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.choice-icon svg {
    width: 26px;
    height: 26px;
}

.choice-icon--orange {
    background: #e8f3ec;
    color: var(--green);
}

.choice-icon--blue {
    background: #e7ede9;
    color: var(--green-dark);
}

.choice-icon--green {
    background: #e6f4ea;
    color: #1a7f37;
}

a.choice {
    text-decoration: none;
    color: inherit;
}

.choice-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.choice-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lock-icon {
    color: #d97706;
    flex-shrink: 0;
}

.choice-desc {
    font-size: .87rem;
    color: var(--muted);
}

/* ---------- Etape Mot de passe ---------- */

.password-box {
    display: flex;
    flex-direction: column;
}

.password-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.password-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fef3c7;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.choice-arrow {
    font-size: 1.6rem;
    color: #c3c8d0;
    transition: transform .2s, color .2s;
}

.choice:hover .choice-arrow {
    transform: translateX(4px);
    color: var(--green);
}

/* ---------- Formulaires ---------- */

.back {
    background: none;
    border: none;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    padding: 0 0 16px;
    transition: color .2s;
}

.back:hover {
    color: var(--green);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label,
.field-label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
}

#l-equipe option,
#d-equipe option {
    color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fafafa;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23, 106, 61, .15);
}

::placeholder {
    color: #b0b6bf;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

select {
    cursor: pointer;
    padding-right: 40px;
}

select:invalid {
    color: #b0b6bf;
}

/* ---------- Segmented control (Creation / Mutation) ---------- */

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #edf1ee;
    border-radius: 12px;
    padding: 5px;
}

.segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segment span {
    display: block;
    text-align: center;
    font-weight: 600;
    font-size: .95rem;
    color: var(--muted);
    padding: 10px 8px;
    border-radius: 9px;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}

.segment input:checked+span {
    background: #fff;
    color: var(--green);
    box-shadow: 0 2px 8px rgba(13, 63, 36, .12);
}

.segment input:focus-visible+span {
    box-shadow: 0 0 0 3px rgba(23, 106, 61, .25);
}

/* ---------- Case a cocher (surclassement) ---------- */

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-box {
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: background .2s, border-color .2s;
}

.check-box svg {
    width: 12px;
    height: 10px;
    opacity: 0;
    transition: opacity .15s;
}

.check input:checked+.check-box {
    background: var(--green);
    border-color: var(--green);
}

.check input:checked+.check-box svg {
    opacity: 1;
}

.check input:focus-visible+.check-box {
    box-shadow: 0 0 0 3px rgba(23, 106, 61, .25);
}

.check-text {
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
}

/* ---------- Boutons ---------- */

.btn {
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--green-light), var(--green));
    border: none;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(23, 106, 61, .3);
    transition: transform .15s, box-shadow .2s, opacity .2s;
    margin-top: 4px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(23, 106, 61, .4);
}

.btn:active {
    transform: none;
}

.btn:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}

.btn--ghost {
    background: #fff;
    color: var(--green);
    border: 1.5px solid var(--green);
    box-shadow: none;
}

.btn--ghost:hover {
    background: #f1f8f3;
    box-shadow: none;
}

.form-error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .9rem;
    font-weight: 500;
}

/* ---------- Confirmation ---------- */

.success-check {
    width: 84px;
    height: 84px;
    margin: 8px auto 20px;
    display: block;
}

.success-circle {
    stroke: var(--green);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: draw .6s ease forwards;
}

.success-tick {
    stroke: var(--green);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw .4s ease .5s forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

#step-success .btn {
    margin-top: 12px;
}

/* ---------- Footer ---------- */

.footer {
    margin-top: auto;
    padding-top: 28px;
    text-align: center;
    font-size: .8rem;
    color: #9aa1ab;
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
    .card {
        padding: 24px 18px;
    }

    .title {
        font-size: 1.25rem;
    }

    .choice {
        padding: 15px 14px;
        gap: 12px;
    }

    .brand-name {
        font-size: 1.05rem;
    }

    .logo {
        width: 48px;
    }
}