/* ============================================================
   SchweizExpress, Formulaire de parrainage
   Design aligné sur le site (accent #ee4555, cartes arrondies)
   ============================================================ */

.se-form {
    --se-accent: #ee4555;
    --se-accent-dark: #d12f3f;
    --se-dark: #1f2430;
    --se-text: #3a3f4b;
    --se-muted: #8a8f9c;
    --se-border: #e6e8ee;
    --se-bg: #f6f7f9;
    --se-radius: 14px;
    --se-shadow: 0 6px 24px rgba(31, 36, 48, 0.08);

    color: var(--se-text);
    font-size: 16px;
    line-height: 1.55;
}

.se-form *,
.se-form *::before,
.se-form *::after {
    box-sizing: border-box;
}

.se-form-error {
    background: #fdeef0;
    border: 1px solid #f5c2c9;
    color: #a94250;
    border-radius: 10px;
    padding: 16px 20px;
}

/* --- Intro / présélection ------------------------------------ */

.se-form-intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
}

.se-form-intro h2 {
    color: var(--se-dark);
    margin: 0 0 10px;
}

.se-form-preselect {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fdeef0;
    border: 1px solid #f5c2c9;
    border-radius: var(--se-radius);
    padding: 18px 22px;
    margin-bottom: 28px;
}

.se-form-preselect-icon {
    font-size: 32px;
}

.se-form-preselect p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--se-muted);
}

/* --- Grille équipes ------------------------------------------ */

.se-form-teams {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.se-form-team {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
    overflow: hidden;
    box-shadow: var(--se-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.se-form-team:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(31, 36, 48, 0.14);
}

.se-form-team.is-preselected {
    border-color: var(--se-accent);
    box-shadow: 0 0 0 3px rgba(238, 69, 85, 0.18), var(--se-shadow);
}

.se-form-team-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--se-bg);
}

.se-form-team-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.se-form-team-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--se-muted);
}

.se-form-team-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--se-dark);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 999px;
}

.se-form-team-body {
    padding: 18px 20px 6px;
    flex: 1;
}

.se-form-team-body h3 {
    margin: 0 0 6px;
    color: var(--se-dark);
    font-size: 19px;
}

.se-form-team-emoji {
    font-size: 18px;
}

.se-form-team-members {
    font-size: 13px;
    color: var(--se-muted);
    margin: 0 0 10px;
}

.se-form-team-desc {
    font-size: 14px;
    margin: 0;
}

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

.se-form-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 16px 20px 20px;
    padding: 12px 20px;
    background: var(--se-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease;
}

.se-form-btn:hover {
    background: var(--se-accent-dark);
    color: #fff;
}

.se-form-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* --- Modale --------------------------------------------------- */

.se-form-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 16px;
    overflow-y: auto;
}

.se-form-modal[hidden] {
    display: none;
}

.se-form-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(31, 36, 48, 0.66);
    backdrop-filter: blur(2px);
}

.se-form-modal-box {
    position: relative;
    background: var(--se-bg, #f6f7f9);
    border-radius: 18px;
    max-width: 1180px;
    width: 100%;
    padding: 32px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.se-form-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #8a8f9c;
    cursor: pointer;
}

.se-form-modal-close:hover {
    color: #1f2430;
}

.se-form-modal-head {
    text-align: center;
    margin-bottom: 24px;
}

.se-form-modal-head h3 {
    margin: 0 0 6px;
    color: #1f2430;
}

.se-form-modal-note {
    text-align: center;
    font-size: 13px;
    color: #8a8f9c;
    margin: 24px 0 0;
}

/* --- Cartes niveaux ------------------------------------------- */

.se-form-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.se-form-level {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-top: 4px solid var(--level-color, #8a8f9c);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(31, 36, 48, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.se-form-level:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(31, 36, 48, 0.14);
}

.se-form-level.is-best {
    border-color: #d4a017;
    border-top-color: #d4a017;
    box-shadow: 0 8px 28px rgba(212, 160, 23, 0.22);
}

.se-form-level-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #d4a017;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 1;
}

.se-form-level-media {
    aspect-ratio: 16 / 9;
    background: #f6f7f9;
}

.se-form-level-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.se-form-level-head {
    padding: 16px 18px 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.se-form-level-head h4 {
    margin: 0;
    font-size: 18px;
    color: var(--level-color, #1f2430);
}

.se-form-level-price {
    font-size: 18px;
    font-weight: 800;
    color: #1f2430;
    white-space: nowrap;
}

.se-form-level-votes {
    margin: 12px 18px 0;
    background: #fdeef0;
    color: #d12f3f;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
}

.se-form-level-votes strong {
    font-size: 15px;
}

.se-form-level-features {
    list-style: none;
    margin: 14px 0 0;
    padding: 0 18px;
    flex: 1;
    font-size: 13.5px;
}

.se-form-level-features li {
    padding: 5px 0 5px 22px;
    position: relative;
    border-bottom: 1px dashed #eef0f4;
}

.se-form-level-features li:last-child {
    border-bottom: none;
}

.se-form-level-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--level-color, #ee4555);
    font-weight: 700;
}

.se-form-level-features .se-form-feature-inherit {
    color: #8a8f9c;
    font-style: italic;
    padding-left: 0;
}

.se-form-level-features .se-form-feature-inherit::before {
    content: none;
}

/* --- Responsive ----------------------------------------------- */

@media (max-width: 680px) {
    .se-form-teams {
        grid-template-columns: 1fr;
    }

    .se-form-modal {
        padding: 0;
        align-items: stretch;
    }

    .se-form-modal-box {
        border-radius: 0;
        padding: 24px 16px;
    }

    .se-form-levels {
        grid-template-columns: 1fr;
    }
}
