/**
 * contact-modal.css — modale « Nous contacter » (contact-modal.js) pour les pages publiques
 * Éditorial, qui ne chargent pas styles.css. Règles reprises telles quelles de styles.css
 * (bloc « Modale de contact ») ; seules les couleurs passent au laiton et à l'ivoire.
 */
.cm-overlay {
    --primary: #C2A06B;
    --primary-light: #D8BC8C;
    --text-main: #F4F1EA;
    --text-muted: #B9B1A3;
    --glass-border: rgba(244, 241, 234, 0.12);
    --transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

body.cm-open {
    overflow: hidden;
}

/* Les display:flex de la modale ne doivent pas écraser l'attribut hidden. */
.cm-overlay [hidden] {
    display: none !important;
}

.cm-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(5, 5, 8, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.cm-overlay.is-open {
    display: flex;
    animation: cm-fade 0.2s ease-out;
}

.cm-dialog {
    position: relative;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    width: 100%;
    max-width: 920px;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    background: #0d0e14;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: cm-pop 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cm-info {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 2rem;
    background: #0a0b10;
    border-right: 1px solid var(--glass-border);
}

.cm-form-wrap {
    padding: 2rem;
}

.cm-title {
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
}

.cm-form-wrap .cm-title {
    margin-bottom: 1.25rem;
    padding-right: 2.75rem;
}

.cm-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}

.cm-card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}

.cm-card small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cm-card strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.cm-card a {
    color: inherit;
}

.cm-card a:hover {
    color: var(--primary-light);
}

.cm-card .cm-wa {
    color: #25D366;
}

.cm-note {
    display: flex;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.cm-note i {
    margin-top: 0.2rem;
}

.cm-note--faq {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.cm-note--faq a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.cm-note--meuble {
    background: rgba(194, 160, 107, 0.07);
    border: 1px solid rgba(194, 160, 107, 0.22);
    color: var(--text-muted);
}

.cm-note--meuble i {
    color: var(--primary-light);
}

.cm-note--meuble strong {
    color: var(--text-main);
}

.cm-link-btn {
    display: inline;
    margin-top: 0.35rem;
    padding: 0;
    background: none;
    border: none;
    font: inherit;
    font-weight: 600;
    color: var(--primary-light);
    cursor: pointer;
    text-decoration: underline;
}

.cm-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.cm-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

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

.cm-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.cm-field label span {
    color: #f87171;
}

.cm-field input,
.cm-field select,
.cm-field textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background: #050508;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: var(--transition);
}

.cm-field input::placeholder,
.cm-field textarea::placeholder {
    color: #64748b;
}

.cm-field input:focus,
.cm-field select:focus,
.cm-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(194, 160, 107, 0.18);
}

.cm-field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

.cm-field select option {
    background: #0d0e14;
    color: var(--text-main);
}

.cm-field textarea {
    min-height: 130px;
    resize: vertical;
}

.cm-field.has-error input,
.cm-field.has-error select,
.cm-field.has-error textarea {
    border-color: #f87171;
}

.cm-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #f87171;
}

.cm-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cm-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.5rem;
    font: inherit;
    font-weight: 600;
    border-radius: 14px;
}

.cm-submit[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.cm-legal {
    margin-top: 1rem;
    font-size: 0.75rem;
    line-height: 1.55;
    color: #64748b;
}

.cm-legal a {
    color: var(--primary-light);
}

.cm-alert {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

.cm-alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.cm-alert-actions a {
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    border: 1px solid rgba(252, 165, 165, 0.5);
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.cm-alert-actions a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cm-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 0.5rem;
}

.cm-success-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.6rem;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #34d399;
}

.cm-success h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.cm-success p {
    max-width: 340px;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

@keyframes cm-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@media (max-width: 800px) {
    .cm-dialog {
        grid-template-columns: 1fr;
    }

    .cm-form-wrap {
        order: -1;
        padding: 1.5rem;
    }

    .cm-info {
        padding: 1.5rem;
        border-right: none;
        border-top: 1px solid var(--glass-border);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cm-overlay.is-open,
    .cm-dialog {
        animation: none;
    }
}
