/**
 * AM Portfolio - Formulaire de contact
 * Style cartoon pour le shortcode [am_form]
 *
 * @since 1.2.0
 */

/* ================================
   FORM (element racine du shortcode)
   ================================ */
.am-form {
    position: relative;
    width: 100%;
}

/* ================================
   GRILLE
   ================================ */
.am-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .am-form__grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

.am-form__field--full {
    grid-column: 1 / -1;
}

/* ================================
   LABEL
   ================================ */
.am-form__label {
    display: block;
    font-size: 0.625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--anthracite, #2f3542);
}

/* ================================
   INPUT / TEXTAREA
   ================================ */
.am-form__input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    margin: 0;
    border: 3px solid var(--anthracite, #2f3542) !important;
    border-radius: 1rem !important;
    padding: 0.75rem 1rem !important;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--anthracite, #2f3542) !important;
    background-color: white !important;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.am-form__input::placeholder {
    color: #a0aec0;
    font-weight: 500;
}

.am-form__input:focus {
    border-color: var(--bleu, #4facfe) !important;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15) !important;
    background-color: #fff !important;
}

.am-form__input--error {
    border-color: #ff6b6b !important;
    background-color: #fff1f1;
    box-shadow: none;
}

.am-form__textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* ================================
   ERROR MESSAGE
   ================================ */
.am-form__error {
    color: #ff6b6b;
    font-size: 0.7rem;
    font-weight: 800;
    margin: 4px 0 0 0;
    display: none;
}

/* ================================
   SUBMIT BUTTON
   ================================ */
.am-form__submit {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background: #ff6b6b;
    border: 3px solid var(--anthracite, #2f3542);
    box-shadow: 4px 4px 0px var(--anthracite, #2f3542);
    border-radius: 1.2rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.am-form__submit:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--anthracite, #2f3542);
}

.am-form__submit:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0px var(--anthracite, #2f3542);
}

.am-form__submit--loading {
    opacity: 0.6;
    cursor: wait;
}

/* ================================
   STAMP
   ================================ */
.am-form__stamp {
    position: absolute;
    bottom: 30px;
    right: 30px;
    transform: scale(3) rotate(-10deg);
    opacity: 0;
    pointer-events: none;
    z-index: 60;
    width: auto;
    min-width: 140px;
    padding: 12px 20px;
    border: 5px solid currentColor;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.4rem;
    line-height: 1.1;
    letter-spacing: 2px;
    background: white;
    box-shadow: inset 0 0 0 4px white, inset 0 0 0 7px currentColor;
}

@media (min-width: 768px) {
    .am-form__stamp {
        bottom: 40px;
        right: 40px;
        min-width: 200px;
        padding: 15px 25px;
        font-size: 1.8rem;
    }
}

.am-form__stamp--error {
    color: #ff6b6b;
}

.am-form__stamp--success {
    color: #27ae60;
}

.am-form__stamp-sub {
    font-size: 0.5em;
    font-weight: 700;
    display: block;
    margin-top: 5px;
}
