/* ==========================================================================
   DÉTAIL ANNONCE PUBLIQUE — detail.css
   Breakpoints : mobile (<481px) / tablette (481–900px) /
                 desktop (901–1400px) / grand écran (>1400px)
   ========================================================================== */

:root {
    --orange: #FF5C00;
    --orange-light: #FFF3EE;
    --dark: #121212;
    --grey: #6B7280;
    --border: #EBEBEB;
}

.det-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
}

/* ── Breadcrumb ── */
.det-breadcrumb {
    font-size: 12px;
    color: var(--grey);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.det-breadcrumb a { color: var(--grey); text-decoration: none; }
.det-breadcrumb a:hover { color: var(--orange); }
.det-breadcrumb .current { color: var(--dark); font-weight: 500; }

/* ── Layout global ── */
.det-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

/* ── Cartes génériques ── */
.det-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.det-card-pad { padding: 20px; }
.det-card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 15px;
}

/* ── Galerie ── */
.det-gallery { overflow: hidden; }
.det-gallery-main { position: relative; background: #F1F5F9; }
.det-gallery-main img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}
.det-gallery-empty {
    height: 280px;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.det-gallery-empty i { font-size: 56px; color: #CBD5E1; }

.det-type-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}
.det-type-badge.type-occasion { background: #FEF9C3; color: #854D0E; }
.det-type-badge.type-neuve    { background: #DCFCE7; color: #166534; }
.det-type-badge.type-location { background: #EDE9FE; color: #5B21B6; }
.det-type-badge.type-pieces   { background: #FEE2E2; color: #991B1B; }

.det-featured-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--orange);
    color: #fff;
}

.det-thumbs { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; }
.det-thumb {
    width: 72px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
}
.det-thumb.active { border-color: var(--orange); }
.det-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Titre + prix ── */
.det-titre {
    font-family: 'Syne', sans-serif;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 800;
    margin: 0 0 10px;
}
.det-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.det-prix {
    font-size: 22px;
    font-weight: 800;
    color: var(--orange);
    font-family: 'Syne', sans-serif;
}
.det-prix-suffix { font-size: 14px; font-weight: 400; }
.det-prix-devis { font-size: 16px; }
.det-prix-type { font-size: 13px; font-weight: 500; color: var(--grey); }
.det-meta-item { font-size: 13px; color: var(--grey); display: flex; align-items: center; gap: 4px; }
.det-meta-item.small { font-size: 12px; }

/* ── Specs ── */
.det-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.det-spec {
    background: #F8FAFC;
    border-radius: 10px;
    padding: 12px;
}
.det-spec-label { font-size: 11px; color: var(--grey); margin-bottom: 4px; }
.det-spec-value { font-size: 13px; font-weight: 600; color: var(--dark); }

.det-tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.det-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
}
.det-tag.green  { background: #DCFCE7; color: #166534; }
.det-tag.blue   { background: #DBEAFE; color: #1E40AF; }
.det-tag.yellow { background: #FEF9C3; color: #854D0E; }
.det-tag.purple { background: #EDE9FE; color: #5B21B6; }

/* ── Bloc tarifs location ── */
.det-tarifs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.det-tarif-box {
    background: #F8FAFC;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.det-tarif-label { font-size: 11px; color: var(--grey); margin-bottom: 4px; }
.det-tarif-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--orange);
    font-family: 'Syne', sans-serif;
}
.det-dispo-line { font-size: 13px; color: var(--dark); margin-bottom: 10px; }
.det-caution-line { font-size: 13px; color: var(--grey); }

/* ── Options ── */
.det-options-row { display: flex; flex-wrap: wrap; gap: 8px; }
.det-option-tag {
    background: #F0FDF4;
    color: #166534;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #BBF7D0;
}

/* ── Description ── */
.det-description { font-size: 14px; line-height: 1.9; color: var(--dark); }

/* ── Annonces similaires ── */
.det-similaires-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.det-sim-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: box-shadow .15s;
}
.det-sim-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.det-sim-img { height: 120px; background: #F1F5F9; overflow: hidden; }
.det-sim-img img { width: 100%; height: 100%; object-fit: cover; }
.det-sim-img-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.det-sim-img-empty i { font-size: 28px; color: #CBD5E1; }
.det-sim-body { padding: 10px; }
.det-sim-titre { font-size: 13px; font-weight: 600; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.det-sim-prix { font-size: 13px; color: var(--orange); font-weight: 700; margin-top: 4px; }
.det-sim-loc { font-size: 11px; color: var(--grey); margin-top: 2px; }

/* ── Sidebar ── */
.det-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.det-sidebar-card { background: #fff; border-radius: 16px; border: 1px solid var(--border); padding: 20px; }
.det-sidebar-card.pad-sm { padding: 14px; }

.det-vendeur-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    text-decoration: none;
    transition: opacity .15s;
}
.det-vendeur-link:hover { opacity: .8; }
.det-vendeur-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-family: 'Syne', sans-serif;
    flex-shrink: 0;
}
.det-vendeur-nom { font-size: 14px; font-weight: 600; color: var(--dark); }
.det-vendeur-lien { font-size: 12px; color: var(--orange); }

/* ── Boutons d'action ── */
.btn-act {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: opacity .15s;
}
.btn-act:hover { opacity: .9; }
.btn-act.orange { background: var(--orange); color: #fff; }
.btn-act.green  { background: #22c55e; color: #fff; }
.btn-act.red    { background: #EF4444; color: #fff; }
.btn-act.grey   { background: #F3F4F6; color: var(--dark); }
.btn-act.blue   { background: #3B82F6; color: #fff; }
.det-full-btn { width: 100%; justify-content: center; padding: 10px; font-size: 13px; }
.det-full-btn.lg { padding: 12px; font-size: 13.5px; }
.det-cta-note { font-size: 11.5px; color: var(--grey); text-align: center; margin: 8px 0 0; }

.det-message-textarea {
    border-radius: 10px;
    font-size: 13px;
    resize: none;
    width: 100%;
    margin-bottom: 8px;
}

/* ── Infos rapides ── */
.det-infos-label {
    font-size: 11px;
    color: var(--grey);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.det-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #F8F8F8;
}
.det-info-row:last-child { border-bottom: none; }
.det-info-icon { font-size: 14px; width: 16px; }
.det-info-label { font-size: 12px; color: var(--grey); flex: 1; }
.det-info-value { font-size: 12px; font-weight: 600; color: var(--dark); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ── Grand écran (>1400px) ── */
@media (min-width: 1400px) {
    .det-container { max-width: 1280px; }
}

/* ── Tablette (481–900px) : sidebar repasse sous le contenu ── */
@media (max-width: 900px) {
    .det-layout { grid-template-columns: 1fr; }
    .det-sidebar { position: static; }
    .det-container { margin-top: 16px; }
}

/* ── Mobile (<481px) ── */
@media (max-width: 480px) {
    .det-container { padding: 0 12px; margin: 16px auto; }
    .det-card-pad { padding: 14px; }
    .det-titre { font-size: 18px; }
    .det-prix { font-size: 19px; }
    .det-meta-row { gap: 10px; }
    .det-specs-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .det-tarifs-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .det-tarif-value { font-size: 14px; }
    .det-similaires-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .det-gallery-main img { max-height: 260px; }
    .det-thumb { width: 60px; height: 48px; }
}