/* =============================================================================
   Styles du module « Annonces » — LIJA Robotics
   Couleur principale : #013262
   ============================================================================= */

.annonces-wrap { padding-bottom: 40px; }

/* --- Barre d'action ------------------------------------------------------- */
.ann-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    justify-content: center; margin: 10px 0 25px;
}
.ann-btn-ghost {
    display: inline-block; border: 2px solid #013262; color: #013262;
    padding: 8px 16px; font-weight: 600; text-transform: uppercase; font-size: 14px;
    border-radius: 3px; text-decoration: none; transition: all .2s;
}
.ann-btn-ghost:hover { background: #013262; color: #fff; text-decoration: none; }
.ann-link { color: #013262; text-decoration: underline; font-size: 14px; }
.ann-intro { max-width: 760px; margin: 0 auto 25px; color: #555; }

.ann-badge {
    display: inline-block; background: #c62828; color: #fff; font-size: 12px;
    font-weight: 700; border-radius: 10px; padding: 1px 7px; margin-left: 4px; line-height: 1.5;
}

/* --- Filtres -------------------------------------------------------------- */
.ann-filters { margin-bottom: 30px; }
.ann-filters-row {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center;
}
.ann-filters select, .ann-filters input[type="text"] {
    padding: 9px 10px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px;
    min-width: 180px; background: #fff;
}
.ann-filters button { border: 0; cursor: pointer; }
/* Les étapes masquées du formulaire de recherche ne doivent jamais s'afficher. */
.ann-filters [hidden] { display: none !important; }

/* --- Messages / notices --------------------------------------------------- */
.ann-notice {
    text-align: center; padding: 14px; border-radius: 4px; margin: 15px 0;
    background: #f1f3f6; color: #333;
}
.ann-notice-ok    { background: #e8f5e9; color: #2e7d32; }
.ann-notice-error { background: #fdecea; color: #c62828; }

/* --- Grille de cartes ----------------------------------------------------- */
.ann-grid { margin-top: 10px; }
.ann-grid > div { margin-bottom: 26px; }
.ann-card {
    display: block; background: #fff; border: 1px solid #e3e3e3; border-radius: 6px;
    overflow: hidden; text-decoration: none; color: inherit; height: 100%;
    transition: box-shadow .2s, transform .2s;
}
.ann-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.12); transform: translateY(-3px); text-decoration: none; }
.ann-card-media { position: relative; height: 190px; background: #f4f6f9; overflow: hidden; }
.ann-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ann-card-noimg {
    display: flex; align-items: center; justify-content: center; height: 100%;
    color: #b9c4d4; font-size: 54px;
}
.ann-tag {
    position: absolute; top: 10px; left: 10px; color: #fff; font-size: 11px;
    font-weight: 700; text-transform: uppercase; padding: 4px 9px; border-radius: 3px;
    letter-spacing: .3px;
}
.ann-tag-vente      { background: #013262; }
.ann-tag-prestation { background: #00897b; }
.ann-card-body { padding: 14px 16px 18px; }
.ann-cat { color: #888; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.ann-card-title { font-size: 17px; margin: 6px 0 8px; color: #013262; line-height: 1.3; }
.ann-card-loc { color: #777; font-size: 13px; margin: 0 0 4px; }
.ann-card-price { font-weight: 700; color: #222; font-size: 16px; margin: 0; }

/* --- Détail d'une annonce ------------------------------------------------- */
.ann-back { margin: 5px 0 20px; }
.ann-back a { color: #013262; text-decoration: none; font-weight: 600; }
.ann-detail { margin-bottom: 10px; }
.ann-detail-media {
    background: #f4f6f9; border: 1px solid #e3e3e3; border-radius: 6px; overflow: hidden;
    min-height: 260px; display: flex; align-items: center; justify-content: center;
}
.ann-detail-media img { width: 100%; height: auto; display: block; }
.ann-detail-noimg { color: #b9c4d4; font-size: 90px; padding: 60px; }
.ann-cat-inline { margin-left: 10px; }
.ann-detail-title { color: #013262; margin: 14px 0 8px; }
.ann-detail-price { font-size: 24px; font-weight: 700; color: #222; margin: 0 0 14px; }
.ann-meta { list-style: none; padding: 0; margin: 0 0 18px; }
.ann-meta li { color: #555; margin-bottom: 6px; }
.ann-meta i { color: #013262; width: 18px; }

.ann-phone { padding: 14px; background: #f4f6f9; border-radius: 5px; }
.ann-phone p { margin: 0; }
.ann-phone-locked a { color: #013262; font-weight: 600; }
.ann-phone-none { color: #666; }

.ann-description { margin: 25px 0; }
.ann-description p { color: #444; line-height: 1.7; }

.ann-contact {
    margin-top: 20px; padding: 22px; border: 1px solid #e3e3e3; border-radius: 6px;
    background: #fafbfc;
}

/* --- Formulaires ---------------------------------------------------------- */
.ann-form label { display: block; font-weight: 600; margin: 14px 0 5px; color: #333; }
.ann-form input[type="text"], .ann-form input[type="email"],
.ann-form input[type="password"], .ann-form input[type="file"],
.ann-form select, .ann-form textarea {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 3px;
    font-size: 14px; background: #fff;
}
.ann-form textarea { resize: vertical; }
.ann-form button { border: 0; cursor: pointer; margin-top: 16px; }
.ann-help { color: #888; font-size: 13px; }
.ann-form-two { display: flex; gap: 16px; flex-wrap: wrap; }
.ann-form-two > div { flex: 1 1 200px; }
.ann-type-choice { display: flex; gap: 24px; margin: 6px 0 4px; }
.ann-radio { font-weight: 600 !important; }
.ann-check { font-weight: 400 !important; margin-top: 18px; }
.ann-check small { display: block; color: #888; font-weight: 400; }
.ann-submit { margin-top: 20px; }
.ann-form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ann-form-inline input[type="text"] { width: auto; flex: 1 1 220px; }
.ann-form-inline button { margin-top: 0; }

.ann-auth-box {
    border: 1px solid #e3e3e3; border-radius: 6px; padding: 24px; background: #fff; height: 100%;
}

/* --- Compte --------------------------------------------------------------- */
.ann-account-head { text-align: center; margin-bottom: 25px; }
.ann-panel {
    border: 1px solid #e3e3e3; border-radius: 6px; padding: 22px; margin-bottom: 24px; background: #fff;
}
.ann-table { width: 100%; border-collapse: collapse; }
.ann-table th, .ann-table td { text-align: left; padding: 10px; border-bottom: 1px solid #eee; vertical-align: middle; }
.ann-table th { color: #013262; font-size: 13px; text-transform: uppercase; }
.ann-state { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 3px; }
.ann-state-on  { background: #e8f5e9; color: #2e7d32; }
.ann-state-off { background: #eee; color: #777; }
.ann-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ann-inline-form { display: inline; margin: 0; }
.ann-mini {
    border: 1px solid #013262; background: #fff; color: #013262; padding: 5px 10px;
    border-radius: 3px; cursor: pointer; font-size: 13px;
}
.ann-mini:hover { background: #013262; color: #fff; }
.ann-mini-danger { border-color: #c62828; color: #c62828; }
.ann-mini-danger:hover { background: #c62828; color: #fff; }

.ann-conv-list { list-style: none; padding: 0; margin: 0; }
.ann-conv-list li { border-bottom: 1px solid #eee; }
.ann-conv-list a {
    display: block; padding: 14px 6px; text-decoration: none; color: inherit; position: relative;
}
.ann-conv-list a:hover { background: #f7f9fc; }
.ann-conv-title { display: block; font-weight: 700; color: #013262; }
.ann-conv-meta { display: block; font-size: 13px; color: #777; margin: 2px 0; }
.ann-conv-snippet { display: block; font-size: 13px; color: #555; }
.ann-conv-list .ann-badge { position: absolute; right: 6px; top: 16px; }

/* --- Fil de discussion ---------------------------------------------------- */
.ann-thread-head { margin-bottom: 18px; }
.ann-thread {
    border: 1px solid #e3e3e3; border-radius: 6px; padding: 18px; background: #fafbfc;
    max-height: 460px; overflow-y: auto; margin-bottom: 18px;
}
.ann-msg { max-width: 78%; margin-bottom: 14px; padding: 10px 14px; border-radius: 10px; }
.ann-msg-body { line-height: 1.5; }
.ann-msg-time { font-size: 11px; color: #999; margin-top: 4px; }
.ann-msg-mine  { background: #013262; color: #fff; margin-left: auto; border-bottom-right-radius: 2px; }
.ann-msg-mine .ann-msg-time { color: #cdd8e8; text-align: right; }
.ann-msg-other { background: #fff; border: 1px solid #e3e3e3; margin-right: auto; border-bottom-left-radius: 2px; }
.ann-reply textarea { width: 100%; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
    .ann-filters select, .ann-filters input[type="text"] { min-width: 0; width: 100%; }
    .ann-filters-row { flex-direction: column; align-items: stretch; }
    .ann-msg { max-width: 90%; }
    /* Tableau « Mes annonces » : texte centré dans les cases sur mobile. */
    .ann-table th, .ann-table td { text-align: center; }
    .ann-actions { justify-content: center; }
}

/* --- Badge « messages non lus » sur l'onglet de menu « Mes Annonces » ------ */
.menu .ann-nav-badge {
    display: inline-block; background: #c62828; color: #fff; font-size: 11px;
    font-weight: 700; line-height: 1; border-radius: 10px; padding: 2px 6px;
    margin-left: 3px; vertical-align: middle;
}

/* --- Pied de page collé en bas sur les pages courtes (mode bureau) ----------
   Sur « Nos Services » et « Annonces » (peu de contenu), le bandeau bleu
   restait au milieu de l'écran. On étire le corps de page sur toute la hauteur
   de la fenêtre et on laisse la zone de contenu grandir, ce qui repousse le
   pied de page tout en bas. Le mobile n'est pas modifié. */
@media (min-width: 992px) {
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    body > .section-cotent { flex: 1 0 auto; }
    body > .site-footer    { flex: 0 0 auto; }
}

/* --- Galerie d'une annonce : 1 grande image + jusqu'à 3 vignettes ---------- */
.ann-gallery-main {
    background: #f4f6f9; border: 1px solid #e3e3e3; border-radius: 6px; overflow: hidden;
    min-height: 260px; display: flex; align-items: center; justify-content: center;
}
.ann-gallery-main img { width: 100%; height: auto; display: block; }
.ann-gallery-thumbs {
    display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap;
}
.ann-thumb {
    padding: 0; border: 2px solid #e3e3e3; border-radius: 5px; background: #fff;
    cursor: pointer; overflow: hidden; line-height: 0; transition: border-color .15s ease;
    width: 84px; height: 64px;
}
.ann-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ann-thumb:hover { border-color: #9fb4cf; }
.ann-thumb.is-active { border-color: #013262; }

/* --- Inscription : lien « renvoyer le code » ------------------------------- */
.ann-resend { margin-top: 12px; text-align: center; }
.ann-linklike {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: #013262; text-decoration: underline; font-size: 14px;
}
.ann-linklike:hover { color: #021f3c; }

/* --- Vérification en direct de l'e-mail à l'inscription -------------------- */
.ann-email-msg { display: block; margin: -6px 0 8px; font-size: 13px; min-height: 16px; }
.ann-email-msg.is-taken { color: #c62828; }
.ann-email-msg.is-free  { color: #2e7d32; }
