/* ============================================
   DJE – Contact Produit : Front CSS
   ============================================ */

/* ── Boutons déclencheurs ── */
.dje-contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.dje-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 2px solid currentColor;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    background: transparent;
    line-height: 1.3;
}

.dje-btn--devis {
    color: #2c6e49;
    border-color: #2c6e49;
}
.dje-btn--devis:hover {
    background: #2c6e49;
    color: #fff;
}

.dje-btn--question {
    color: #1a5276;
    border-color: #1a5276;
}
.dje-btn--question:hover {
    background: #1a5276;
    color: #fff;
}

.dje-btn--alerte {
    color: #b7410e;
    border-color: #b7410e;
}
.dje-btn--alerte:hover {
    background: #b7410e;
    color: #fff;
}

/* ── Modales ── */
.dje-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.dje-modal.is-open {
    display: flex;
}

.dje-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    cursor: pointer;
}

.dje-modal__box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 8px;
    padding: 32px 28px 28px;
    width: 94%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    animation: djeModalIn 0.22s ease;
}

@keyframes djeModalIn {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dje-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 4px;
}
.dje-modal__close:hover { color: #000; }

.dje-modal__title {
    margin: 0 0 20px;
    font-size: 1.15rem;
    color: #1a1a1a;
    padding-right: 28px;
}

.dje-modal__intro {
    color: #555;
    font-size: 0.92rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ── Formulaires ── */
.dje-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dje-form__row--2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .dje-form__row--2 { grid-template-columns: 1fr; }
}

.dje-form__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dje-form__group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.dje-form__group label span {
    color: #c0392b;
}

.dje-form__group input,
.dje-form__group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.dje-form__group input:focus,
.dje-form__group textarea:focus {
    outline: none;
    border-color: #2c6e49;
    background: #fff;
}

.dje-form__group textarea {
    resize: vertical;
    min-height: 90px;
}

.dje-form__required-note {
    font-size: 0.78rem;
    color: #777;
    margin: 0;
}

.dje-submit {
    align-self: flex-start;
    margin-top: 4px !important;
}

/* ── Flash messages ── */
.dje-flash {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.92rem;
    font-weight: 500;
}

.dje-flash--ok {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.dje-flash--err {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}
