/* =============================================================================
   Tattoo Fest – Formulaire d'inscription
   CSS calqué sur les styles CF7 existants du site
   ============================================================================= */

.tf-form-wrap {

    /* ── Lignes / blocs ──────────────────────────────────────────────────── */
    .form-ligne {
        margin-bottom: 1.5rem;
    }

    /* ── Labels ──────────────────────────────────────────────────────────── */
    .label {
        display: block;
        color: var(--color-primary);
        margin-bottom: 0.5rem;
        font-weight: 500;

        .info-supp {
            font-weight: 400;
            font-size: 0.875rem;
            opacity: 0.7;
            margin-left: 0.25rem;
        }
    }

    /* ── Champs ──────────────────────────────────────────────────────────── */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 1rem;
        font-family: inherit;
        transition: border-color 0.3s ease;
        background-color: #fff;
        color: inherit;

        &:focus {
            outline: none;
            border-color: var(--color-primary);
        }
    }

    /* ── Textarea ────────────────────────────────────────────────────────── */
    textarea {
        min-height: 150px;
        resize: vertical;
    }

    /* ── Select ──────────────────────────────────────────────────────────── */
    select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.875rem center;
        padding-right: 2.5rem;
        cursor: pointer;
    }

    /* ── Champs fichier ──────────────────────────────────────────────────── */
    input[type="file"] {
        width: 100%;
        padding: 0.5rem 0;
        font-size: 0.9rem;
        font-family: inherit;
        cursor: pointer;
        color: inherit;
    }

    /* ── Aperçu fichier ──────────────────────────────────────────────────── */
    .tf-file-preview {
        margin-top: 8px;
    }

    .tf-file-preview__inner {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px;
        background: #f9f9f9;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .tf-file-preview__inner img {
        width: 56px;
        height: 56px;
        object-fit: cover;
        border-radius: 3px;
        flex-shrink: 0;
    }

    .tf-file-preview__name {
        font-size: 0.8125rem;
        color: #555;
        word-break: break-all;
    }

    /* ── Submit + mentions ───────────────────────────────────────────────── */
    .form-ligne-submit-mentions {
        margin-top: 2rem;

        .mentions {
            font-size: 0.875rem;
            color: #666;
            margin-bottom: 0.5rem;
        }
    }

    /* ── Bouton submit ───────────────────────────────────────────────────── */
    .tf-submit {
        position: relative;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
        text-decoration: none;
        line-height: 1;
        font-size: var(--btn-font-size, 1em);
        font-weight: 900;
        padding: 1rem 1.875rem;
        border-radius: 30px;
        border: 2px solid transparent;
        background-color: var(--color-secondary);
        width: fit-content;
        text-transform: uppercase;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        transition: all 0.2s ease-in-out;
        cursor: pointer;
        margin-top: 1rem;

        &:hover {
            opacity: 0.9;
        }

        &:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }
    }

    /* ── Loader spinner ──────────────────────────────────────────────────── */
    .tf-submit__loader {
        display: inline-block;
        width: 14px;
        height: 14px;
        border: 2px solid currentColor;
        border-right-color: transparent;
        border-radius: 50%;
        animation: tf-spin 0.6s linear infinite;
        flex-shrink: 0;
    }

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

/* ── Feedback (succès / erreur) ──────────────────────────────────────────── */
.tf-feedback {
    margin-bottom: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.tf-feedback__success {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.tf-feedback__error {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #e57373;

    ul {
        margin: 0;
        padding-left: 1.25rem;
    }

    li {
        margin-bottom: 0.25rem;
    }
}