/* ====================================================
   APIMO INTEGRATION — STYLES
   ==================================================== */

/* ── Variables ── */
:root {
    --apimo-primary: #1a3c5e;
    --apimo-accent:  #e8a020;
    --apimo-light:   #f5f7fa;
    --apimo-border:  #dde3ec;
    --apimo-text:    #2c3e50;
    --apimo-muted:   #6b7c93;
    --apimo-white:   #ffffff;
    --apimo-radius:  10px;
    --apimo-shadow:  0 4px 24px rgba(26,60,94,0.10);
}

/* ── Grille des biens ── */
.apimo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 10px 0;
}

/* ── Carte bien ── */
.apimo-card {
    background: var(--apimo-white);
    border-radius: var(--apimo-radius);
    box-shadow: var(--apimo-shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid var(--apimo-border);
}
.apimo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(26,60,94,0.16);
}

/* ── Image ── */
.apimo-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--apimo-light);
}
.apimo-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.apimo-card:hover .apimo-card-image img {
    transform: scale(1.05);
}
.apimo-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apimo-muted);
    font-size: 14px;
}

/* ── Badge catégorie ── */
.apimo-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--apimo-accent);
    color: var(--apimo-white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ── Corps de la carte ── */
.apimo-card-body {
    padding: 18px 20px 20px;
}
.apimo-card-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--apimo-primary);
    line-height: 1.3;
}
.apimo-card-location {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--apimo-muted);
}
.apimo-card-meta {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--apimo-text);
}
.apimo-card-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--apimo-primary);
    margin: 0 0 16px;
}
.apimo-card-footer {
    border-top: 1px solid var(--apimo-border);
    padding-top: 14px;
}

/* ── Boutons ── */
.apimo-btn-contact,
.apimo-btn-submit {
    display: inline-block;
    background: var(--apimo-primary);
    color: var(--apimo-white);
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}
.apimo-btn-contact:hover,
.apimo-btn-submit:hover {
    background: #122d47;
    transform: translateY(-1px);
}
.apimo-btn-submit {
    width: 100%;
    text-align: center;
    padding: 13px;
    font-size: 15px;
    margin-top: 4px;
    background: var(--apimo-accent);
}
.apimo-btn-submit:hover {
    background: #c98918;
}
.apimo-btn-submit:disabled {
    background: var(--apimo-muted);
    cursor: not-allowed;
    transform: none;
}

/* ── Modal ── */
.apimo-modal {
    position: fixed;
    inset: 0;
    background: rgba(10,20,40,0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    animation: apimoFadeIn 0.2s ease;
}
@keyframes apimoFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.apimo-modal-content {
    background: var(--apimo-white);
    border-radius: 14px;
    padding: 32px;
    max-width: 520px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: apimoSlideUp 0.25s ease;
}
@keyframes apimoSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.apimo-modal-content h3 {
    margin: 0 0 20px;
    color: var(--apimo-primary);
    font-size: 18px;
}
.apimo-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--apimo-muted);
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.apimo-modal-close:hover {
    background: var(--apimo-light);
    color: var(--apimo-text);
}

/* ── Formulaire de lead ── */
.apimo-lead-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.apimo-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) {
    .apimo-form-row { grid-template-columns: 1fr; }
}
.apimo-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.apimo-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--apimo-text);
}
.apimo-form-group input[type="text"],
.apimo-form-group input[type="email"],
.apimo-form-group input[type="tel"],
.apimo-form-group textarea {
    border: 1.5px solid var(--apimo-border);
    border-radius: 7px;
    padding: 10px 13px;
    font-size: 14px;
    color: var(--apimo-text);
    background: var(--apimo-light);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.apimo-form-group input:focus,
.apimo-form-group textarea:focus {
    border-color: var(--apimo-primary);
    box-shadow: 0 0 0 3px rgba(26,60,94,0.12);
    background: #fff;
}
.apimo-form-group textarea {
    resize: vertical;
    min-height: 100px;
}
.apimo-form-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--apimo-primary);
}

/* ── Messages de statut ── */
.apimo-form-status {
    padding: 12px 16px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
}
.apimo-form-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.apimo-form-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .apimo-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .apimo-modal-content {
        padding: 20px;
    }
}
