:root {
    --blue: #00529B;
    --blue-deep: #003868;
    --gold: #FFCF06;
    --gold-light: #ffe066;
    --gold-ink: #8A6D00; /* variante foncée de l'or, utilisée pour le texte sur fond clair (contraste/accessibilité) */
    --cream: #F8F6F0;
    --paper: #FFFFFF;
    --ink: #202B36;
    --ink-soft: #5b6874;
    --line: #E4E1D6;
    --error: #B3432B;
    --success: #2F7D5A;

    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    --radius: 10px;
    --shadow: 0 4px 24px rgba(16, 37, 61, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Header ---------- */
.topbar {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
    color: #fff;
    padding: 28px 24px 32px;
    text-align: center;
}
.topbar__fanion {
    display: block;
    height: 130px;
    width: auto;
    margin: 0 auto 12px;
}
.topbar__brand {
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.topbar__mark { color: var(--gold); font-size: 28px; line-height: 1; }
.topbar__logo { height: 42px; width: auto; }
.topbar__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.2px;
    max-width: 360px;
    text-align: left;
}
.topbar__sub {
    margin: 8px 0 0;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* ---------- Layout du formulaire ---------- */
.form-shell {
    flex: 1;
    width: 100%;
    max-width: 640px;
    margin: -20px auto 40px;
    padding: 0 16px;
}

/* ---------- Étapes ---------- */
.steps {
    display: flex;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}
.step {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    opacity: 0.4;
    transition: opacity .2s ease;
    min-width: 64px;
}
.step.active { opacity: 1; }
.step.done { opacity: 0.75; }
.step__num {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--gold-ink);
    font-size: 13px;
}
.step__label {
    display: block;
    font-size: 11px;
    color: var(--ink-soft);
    margin-top: 2px;
    white-space: nowrap;
}
.step.active .step__label { color: var(--blue); font-weight: 600; }

/* ---------- Panneau ---------- */
.panel {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin-bottom: 16px;
    animation: fadeIn .3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.panel__title {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 600;
    color: var(--blue);
    margin: 0 0 6px;
}
.panel__hint {
    color: var(--ink-soft);
    font-size: 13.5px;
    margin: 0 0 20px;
}

/* ---------- Champs ---------- */
.field { margin-bottom: 18px; }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 6px;
}
.req { color: var(--gold-ink); }

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    transition: border-color .15s ease;
}
textarea { resize: vertical; min-height: 70px; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26,58,92,0.12);
}
select:disabled { background: #f2f1ec; color: #9aa3ab; cursor: not-allowed; }

/* ---------- Dropzone ---------- */
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover {
    border-color: var(--gold);
    background: #fbf8ee;
}
.dropzone input[type="file"] { display: none; }
.dropzone__icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.dropzone__text strong { display: block; color: var(--blue); font-size: 14.5px; }
.dropzone__text span { display: block; color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }

.upload-summary { margin-top: 16px; }
.upload-summary__bar-track {
    height: 8px; border-radius: 4px; background: var(--line); overflow: hidden;
}
.upload-summary__bar-fill {
    height: 100%; width: 0%; background: var(--gold); transition: width .2s ease;
}
#upload-summary-text { font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 0; }

.file-list { list-style: none; padding: 0; margin: 16px 0 0; }
.file-list li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px;
    background: var(--cream);
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 6px;
}
.file-list .file-remove {
    background: none; border: none; color: var(--error);
    cursor: pointer; font-size: 13px; font-weight: 600;
}

/* ---------- Chips (clubs partenaires sélectionnés) ---------- */
.multiselect__chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 10px;
}
.multiselect__chips:empty { margin-bottom: 0; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #eaf1f8; color: var(--blue-deep);
    border-radius: 20px; padding: 5px 8px 5px 12px;
    font-size: 12.5px; font-weight: 600;
}
.chip button {
    background: var(--blue); color: #fff; border: none; border-radius: 50%;
    width: 16px; height: 16px; font-size: 11px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* ---------- Modal de sélection des clubs partenaires ---------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(16, 26, 37, 0.55);
    align-items: center; justify-content: center;
    padding: 16px;
}
.modal-overlay[hidden] { display: none !important; }
.modal-overlay:not([hidden]) { display: flex; }
.modal {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%; max-width: 480px;
    max-height: 85vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.modal__header h3 { margin: 0; font-family: var(--font-display); color: var(--blue); font-size: 17px; }
.modal__close {
    background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer;
    color: var(--ink-soft); padding: 4px 8px;
}
.modal__close:hover { color: var(--ink); }
.modal__body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.modal__search {
    width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 8px;
    font-size: 15px; margin-bottom: 12px; position: sticky; top: 0;
}
.modal__search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,82,155,0.12); }
.modal__list-group-label {
    padding: 10px 4px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
    color: var(--ink-soft); font-weight: 700;
}
.modal__option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px; cursor: pointer; font-size: 14.5px; border-radius: 8px;
}
.modal__option:hover { background: var(--cream); }
.modal__option.selected { background: #eaf1f8; }
.modal__option input { width: 17px; height: 17px; flex-shrink: 0; }
.modal__empty { padding: 24px 12px; color: var(--ink-soft); font-size: 13.5px; text-align: center; }
.modal__footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-top: 1px solid var(--line); flex-shrink: 0;
    font-size: 12.5px; color: var(--ink-soft);
}

/* ---------- Récapitulatif ---------- */
.recap dl { margin: 0; }
.recap { font-size: 14px; }
.recap-row {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 10px 0; border-bottom: 1px solid var(--line);
}
.recap-row:last-child { border-bottom: none; }
.recap-row dt { color: var(--ink-soft); font-weight: 500; }
.recap-row dd { margin: 0; text-align: right; font-weight: 600; color: var(--blue); max-width: 60%; }

/* ---------- Navigation / boutons ---------- */
.form-nav {
    display: flex; gap: 12px; justify-content: flex-end;
    padding: 4px 4px 0;
}
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14.5px;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { box-shadow: 0 4px 14px rgba(26,58,92,0.3); }
.btn--gold { background: var(--gold); color: var(--blue-deep); }
.btn--gold:hover { box-shadow: 0 4px 14px rgba(201,168,60,0.4); }
.btn--ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--line); margin-right: auto; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.form-error {
    color: var(--error);
    background: #fbeae5;
    border: 1px solid #f0c9bd;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 16px 4px 0;
    font-size: 13.5px;
}

/* ---------- Écran de succès ---------- */
.success-screen {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 24px;
    text-align: center;
}
.success-screen__icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 30px;
    display: flex; align-items: center; justify-content: center;
}
.success-screen h2 {
    font-family: var(--font-display);
    color: var(--blue);
    margin: 0 0 8px;
}
.success-screen p { color: var(--ink-soft); margin: 0 0 24px; }

/* ---------- Footer ---------- */
.page-footer {
    text-align: center;
    padding: 18px;
    font-size: 12px;
    color: var(--ink-soft);
}

@media (max-width: 480px) {
    .field-row { flex-direction: column; gap: 0; }
    .panel { padding: 22px 18px; }
    .topbar__title { font-size: 22px; }
}
