/* --- Styles Tableau de Bord --- */
.im-dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 2em;
    max-width: 1200px;
    margin: 2em auto;
}
@media (min-width: 768px) {
    .im-dashboard-container {
        flex-direction: row;
    }
}

.im-dashboard-nav {
    flex: 0 0 250px;
    background: linear-gradient(135deg, var(--im-vert-clair), var(--im-bleu-ciel));
    padding: 1.5em;
    border-radius: 10px;
}
.im-dashboard-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.im-dashboard-nav li a {
    display: block;
    padding: 1em;
    color: var(--im-gris-fonce);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}
.im-dashboard-nav li a:hover,
.im-dashboard-nav li a.im-active {
    background-color: var(--im-rose);
    color: var(--im-blanc);
}

.im-dashboard-content {
    flex-grow: 1;
    background: var(--im-blanc);
    padding: 2em;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.im-tab-content {
    display: none;
}
.im-tab-content.im-active {
    display: block;
}

/* Styles pour le chat */
.im-chat-container {
    display: flex;
    height: 60vh;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}
.im-chat-contacts {
    width: 30%;
    border-right: 1px solid #ddd;
    background: #f9f9f9;
    overflow-y: auto;
}
.im-chat-contact {
    padding: 1em;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}
.im-chat-contact:hover, .im-chat-contact.im-active {
    background-color: var(--im-vert-clair);
}
.im-chat-window {
    width: 70%;
    display: flex;
    flex-direction: column;
}
.im-chat-messages {
    flex-grow: 1;
    padding: 1em;
    overflow-y: auto;
    background: #fdfdfd;
}
.im-chat-message {
    margin-bottom: 1em;
    max-width: 80%;
    display: flex;
    flex-direction: column;
}
.im-message-sent {
    margin-left: auto;
    align-items: flex-end;
}
.im-message-received {
    margin-right: auto;
    align-items: flex-start;
}
.im-message-bubble {
    padding: 0.8em 1.2em;
    border-radius: 20px;
    display: inline-block;
    line-height: 1.4;
    max-width: 100%;
}
.im-message-sent .im-message-bubble {
    background-color: var(--im-bleu-ciel);
    color: var(--im-gris-fonce);
    border-bottom-right-radius: 5px;
}
.im-message-received .im-message-bubble {
    background-color: #f1f0f0;
    border-bottom-left-radius: 5px;
}
.im-chat-form {
    display: flex;
    padding: 1em;
    border-top: 1px solid #ddd;
    background: #fff;
    align-items: center;
}
.im-chat-form textarea {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    margin-right: 10px;
    resize: none;
    height: 45px;
}
.im-chat-attachment-img {
    max-width: 150px;
    border-radius: 10px;
    margin-top: 5px;
}

/* Utilitaires */
.im-hidden {
    display: none;
}
.im-spinner {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid var(--im-rose);
    width: 40px;
    height: 40px;
    -webkit-animation: im-spin 2s linear infinite;
    animation: im-spin 2s linear infinite;
    margin: 20px auto;
}

@-webkit-keyframes im-spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes im-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Règle CSS pour masquer le titre par défaut du thème */
.im-single-annonce-page .entry-header,
.im-single-annonce-page .entry-title,
.im-single-annonce-page .entry-meta,
.im-single-annonce-page .page-header,
.im-single-annonce-page .post-header {
    display: none !important;
}


/* ... [Tous les styles existants (formulaires, cartes, etc.) restent ici] ... */

/*
 * #############################################################
 * ##  STYLES CORRIGÉS POUR LA PAGINATION (APPROCHE MOBILE-FIRST)  ##
 * #############################################################
 */

/* Style de base pour la pagination, appliqué sur tous les écrans */
.im-pagination {
    margin-top: 3em;
    text-align: center;
    clear: both;
    /* Permet aux éléments de la pagination de passer à la ligne si l'écran est très étroit */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px; /* Espace entre les boutons */
}

/* Style de chaque bouton/lien de la pagination */
.im-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px; /* Padding adapté pour le tactile */
    border-radius: 8px;
    background-color: var(--im-blanc);
    border: 1px solid var(--im-vert-clair);
    color: var(--im-rose);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem; /* Taille de police lisible sur mobile */
    line-height: 1;
    transition: background-color 0.3s, color 0.3s;
}

/* Effet au survol (fonctionne aussi au toucher sur certains mobiles) */
.im-pagination .page-numbers:hover {
    background-color: var(--im-rose);
    color: var(--im-blanc);
    border-color: var(--im-rose);
}

/* Style du bouton de la page actuelle */
.im-pagination .page-numbers.current {
    background-color: var(--im-rose);
    color: var(--im-blanc);
    border-color: var(--im-rose);
    cursor: default;
}

/* Style pour les "..." */
.im-pagination .page-numbers.dots {
    border: none;
    background: none;
    padding: 10px 5px;
    align-self: flex-end; /* Aligne les points en bas */
}

/* Style spécifique pour les liens "Précédent" et "Suivant" */
.im-pagination .prev,
.im-pagination .next {
    /* Optionnel : pour les rendre plus discrets si on le souhaite */
    /* background-color: transparent; */
    /* border: none; */
}


/*
 * #############################################
 * ##  STYLES POUR LES ACTIONS ADMINISTRATEUR  ##
 * #############################################
 */

.im-admin-actions {
    padding: 10px 1.5em;
    background-color: #fff8e1; /* Un fond jaune pâle pour attirer l'attention */
    border-top: 1px solid #eee;
    text-align: center;
}

.im-delete-profile-btn {
    background-color: #d32f2f; /* Rouge pour une action destructive */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s;
}

.im-delete-profile-btn:hover {
    background-color: #b71c1c;
}



/*
 * ###############################################
 * ##  STYLES POUR LA BOÎTE DE CONSEIL CONTEXTUEL ##
 * ###############################################
 */

.im-advice-container {
    margin: 3em auto 0; /* Ajoute un espace au-dessus */
    padding: 1.5em 2em;
    max-width: 800px;
    background-color: #e8f4f8;
    border-left: 5px solid #86cde3; /* Utilisation d'une couleur plus visible */
    border-radius: 0 8px 8px 0;
    clear: both; /* S'assure qu'il passe bien en dessous des autres éléments */
}

.im-advice-container .im-advice-title {
    margin-top: 0;
    margin-bottom: 0.75em;
    color: #0c5464; /* Couleur de texte plus foncée pour le contraste */
    font-size: 1.3em;
    font-weight: 600;
}

.im-advice-container .im-advice-text {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.6;
    color: #1a5c6c;
}


/* ----------------------------------------- */

/* ========================================
   ONGLET FAVORIS (dashboard)
   .amn-favoris-list, .amn-fav-item
   Dupliqué depuis amn-annonces.css car le dashboard
   ne charge pas amn-annonces.css.
   ======================================== */
.amn-favoris-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.amn-fav-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.amn-fav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.amn-fav-item img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    filter: blur(4px);
    border: 3px solid var(--im-vert-clair);
}

.amn-fav-item-info {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.amn-no-favoris {
    text-align: center;
    color: #aaa;
    padding: 30px;
    font-style: italic;
}

