/* Modale de contact — Rénovations Maison Margault inc.
   CSS autonome (aucune dépendance à Tailwind) : identité RMM
   bleu #282C4F, orange #EE5F29, beige #E7E0D5, police Inter, coins arrondis. */

.rmm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(20, 22, 40, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.rmm-modal-overlay.is-open {
    display: flex;
}

.rmm-modal {
    background: #ffffff;
    color: #282C4F;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(40, 44, 79, 0.4);
    position: relative;
    animation: rmm-pop 0.2s ease;
}

@keyframes rmm-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.rmm-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0.5rem;
}

.rmm-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #282C4F;
    line-height: 1.25;
}

.rmm-modal-sub {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

.rmm-modal-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: #E7E0D5;
    color: #282C4F;
    border-radius: 9999px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    margin-left: 0.75rem;
}
.rmm-modal-close:hover {
    background: #EE5F29;
    color: #fff;
}

.rmm-form {
    padding: 1rem 1.5rem 1.5rem;
}

.rmm-field {
    margin-bottom: 1rem;
}

.rmm-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #282C4F;
    margin-bottom: 0.35rem;
}
.rmm-label .rmm-req { color: #EE5F29; }

.rmm-input,
.rmm-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.6rem;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: #282C4F;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rmm-input:focus,
.rmm-textarea:focus {
    outline: none;
    border-color: #EE5F29;
    box-shadow: 0 0 0 3px rgba(238, 95, 41, 0.2);
}
.rmm-textarea {
    resize: vertical;
    min-height: 110px;
}

/* Honeypot : hors écran, invisible pour l'humain, détecté par le serveur si rempli */
.rmm-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rmm-submit {
    width: 100%;
    border: none;
    background: #EE5F29;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.rmm-submit:hover { background: #d54f1f; transform: scale(1.02); }
.rmm-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.rmm-msg {
    display: none;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.4;
}
.rmm-msg.is-visible { display: block; }
.rmm-msg-success { background: #e6f4ea; color: #1e7e34; }
.rmm-msg-error   { background: #fdecea; color: #b3261e; }

.rmm-success {
    text-align: center;
    padding: 2rem 1.5rem;
}
.rmm-success-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    background: #EE5F29;
    color: #fff;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.rmm-success h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #282C4F;
    margin: 0 0 0.5rem;
}
.rmm-success p {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
}
.rmm-close-after {
    border: none;
    background: #282C4F;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.rmm-close-after:hover { background: #1c1f3a; }

@media (max-width: 480px) {
    .rmm-modal { max-width: 100%; }
    .rmm-modal-overlay { padding: 0.6rem; }
    .rmm-modal-header { padding: 1.25rem 1.25rem 0.4rem; }
    .rmm-form { padding: 0.9rem 1.25rem 1.25rem; }
}
