/* Extracted by MarketDG CSP agent from annonce.php; block 8. */
* { box-sizing: border-box; }
        body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: #f5f7fb; color: #1f2937; }
        a { color: inherit; text-decoration: none; }
        .container { width: min(1150px, calc(100% - 30px)); margin: 0 auto; }
        header { background: #111827; color: #fff; padding: 16px 0; margin-bottom: 30px; }
        .header-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
        .logo { font-size: 25px; font-weight: 700; }
        .nav { display: flex; gap: 10px; flex-wrap: wrap; }
        .nav a { padding: 9px 13px; border-radius: 8px; background: rgba(255,255,255,.08); }
        .nav a:hover { background: rgba(255,255,255,.16); }
        .back { display: inline-block; margin-bottom: 18px; color: #2563eb; font-weight: 700; }
        .layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 25px; align-items: start; }
        .box { background: #fff; border-radius: 14px; box-shadow: 0 5px 20px rgba(0,0,0,.06); overflow: hidden; }

        /* Galerie principale */
        .main-image {
            position: relative;
            width: 100%;
            height: 450px;
            background: #e5e7eb;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .main-image-open {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            padding: 0;
            border: 0;
            background: transparent;
            cursor: zoom-in;
        }
        .main-image-open img { display: block; width: 100%; height: 100%; object-fit: contain; }
        .no-image { color: #6b7280; padding: 20px; text-align: center; }
        .thumbnails { display: flex; gap: 10px; padding: 15px; overflow-x: auto; scroll-behavior: smooth; }
        .thumbnail { width: 85px; height: 70px; flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: #e5e7eb; }
        .thumbnail.active { border-color: #2563eb; }
        .thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
        .gallery-arrow {
            position: absolute;
            z-index: 2;
            top: 50%;
            transform: translateY(-50%);
            width: 42px;
            height: 48px;
            padding: 0;
            border: 0;
            border-radius: 9px;
            background: rgba(17, 24, 39, .78);
            color: #fff;
            font-size: 30px;
            line-height: 1;
            cursor: pointer;
        }
        .gallery-arrow:hover { background: #2563eb; }
        .gallery-arrow-prev { left: 12px; }
        .gallery-arrow-next { right: 12px; }
        .gallery-count {
            position: absolute;
            right: 12px;
            bottom: 12px;
            z-index: 2;
            padding: 6px 10px;
            border-radius: 20px;
            background: rgba(17, 24, 39, .78);
            color: #fff;
            font-size: 13px;
            pointer-events: none;
        }

        .details { padding: 25px; }
        .category { color: #2563eb; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
        h1 { margin: 0 0 15px; font-size: 30px; line-height: 1.25; }
        .price { font-size: 27px; font-weight: 800; margin-bottom: 20px; }
        .info { display: grid; gap: 10px; margin-bottom: 25px; }
        .info-row { padding: 10px 0; border-bottom: 1px solid #e5e7eb; }
        .label { font-size: 12px; color: #6b7280; margin-bottom: 3px; }
        .value { font-weight: 600; }
        .location-details { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
        .map-location-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 7px 11px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-size: 13px; font-weight: 700; text-decoration: none; }
        .map-location-link:hover, .map-location-link:focus-visible { background: #dbeafe; border-color: #60a5fa; outline-offset: 2px; }
        body.dark-theme .map-location-link { background: #1e3a5f; color: #bfdbfe; border-color: #315780; }
        body.dark-theme .map-location-link:hover, body.dark-theme .map-location-link:focus-visible { background: #264b75; }
        .description-box {
            margin: 8px 18px 24px;
            padding: 20px 22px 22px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            background: #f8fafc;
        }
        .description-box h2 {
            margin: 0 0 14px;
            padding-left: 12px;
            border-left: 4px solid #2563eb;
            color: #111827;
            font-size: 20px;
            line-height: 1.3;
        }
        .description {
            color: #374151;
            font-size: 15px;
            line-height: 1.8;
            white-space: pre-line;
            overflow-wrap: anywhere;
        }
        body.dark-theme .description-box {
            background: #252d28;
            border-color: #3b473f;
        }
        body.dark-theme .description-box h2 { color: #f3f4f6; }
        .favorite-form { margin: 20px 0; }
        .favorite-btn { width: 100%; border: 0; border-radius: 10px; padding: 13px 18px; font-size: 16px; font-weight: 700; cursor: pointer; background: #f3f4f6; color: #111827; }
        .favorite-btn:hover { background: #e5e7eb; }
        .favorite-btn.active { background: #fee2e2; color: #b91c1c; }
        .login-favorite { display: block; text-align: center; padding: 13px 18px; border-radius: 10px; background: #eff6ff; color: #1d4ed8; font-weight: 700; }
        .login-favorite:hover { background: #dbeafe; }
        .seller-box { margin-top: 25px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
        .seller-box h2 { font-size: 19px; margin-top: 0; }
        .phone { display: inline-block; margin-top: 10px; padding: 12px 18px; border-radius: 9px; background: #2563eb; color: #fff; font-weight: 700; }
        .phone:hover { background: #1d4ed8; }
        .date { margin-top: 20px; color: #6b7280; font-size: 13px; }
        .owner-notice { padding: 14px 16px; margin: 0 0 20px; border-radius: 10px; line-height: 1.5; }
        .owner-notice.pending { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
        .owner-notice.rejected { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
        .owner-action { display: inline-block; background: #2563eb; color: white; padding: 11px 15px; border-radius: 8px; font-weight: 700; margin-top: 10px; }
        footer { margin-top: 45px; padding: 25px 0; text-align: center; color: #6b7280; font-size: 13px; }

        /* Visionneuse plein écran et zoom */
        .photo-lightbox[hidden] { display: none !important; }
        .photo-lightbox {
            position: fixed;
            inset: 0;
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(5, 10, 20, .96);
            color: #fff;
        }
        body.lightbox-open { overflow: hidden; }
        .lightbox-toolbar {
            position: absolute;
            top: 12px;
            left: 12px;
            right: 12px;
            z-index: 5;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        .lightbox-controls { display: flex; align-items: center; gap: 8px; }
        .lightbox-toolbar button {
            min-width: 42px;
            min-height: 42px;
            padding: 8px 12px;
            border: 1px solid rgba(255,255,255,.25);
            border-radius: 9px;
            background: #1f2937;
            color: #fff;
            font-size: 18px;
            cursor: pointer;
        }
        .lightbox-toolbar button:hover { background: #2563eb; }
        #zoomReset { min-width: 75px; font-size: 14px; }
        .lightbox-viewport {
            position: absolute;
            inset: 66px 62px 58px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            touch-action: none;
            cursor: grab;
            outline: none;
        }
        .lightbox-viewport img {
            display: block;
            width: auto;
            height: auto;
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transform-origin: center center;
            user-select: none;
            -webkit-user-drag: none;
            will-change: transform;
        }
        .lightbox-viewport img.is-zoomed { cursor: grabbing; }
        .lightbox-arrow {
            position: absolute;
            z-index: 4;
            top: 50%;
            transform: translateY(-50%);
            width: 45px;
            height: 58px;
            border: 0;
            border-radius: 10px;
            background: rgba(55, 65, 81, .9);
            color: #fff;
            font-size: 32px;
            cursor: pointer;
        }
        .lightbox-arrow:hover { background: #2563eb; }
        .lightbox-prev { left: 8px; }
        .lightbox-next { right: 8px; }
        .lightbox-hint {
            position: absolute;
            bottom: 12px;
            left: 10px;
            right: 10px;
            text-align: center;
            color: #d1d5db;
            font-size: 13px;
        }

        @media (max-width: 850px) {
            .layout { grid-template-columns: 1fr; }
            .main-image { height: 380px; }
            .header-inner { flex-direction: column; align-items: flex-start; }
        }
        @media (max-width: 600px) {
            .lightbox-toolbar { top: 8px; left: 8px; right: 8px; gap: 5px; }
            .lightbox-toolbar button { min-width: 36px; min-height: 38px; padding: 6px 9px; }
            .lightbox-controls { gap: 5px; }
            .lightbox-viewport { inset: 60px 42px 52px; }
            .lightbox-arrow { width: 34px; height: 46px; font-size: 25px; }
            .lightbox-prev { left: 3px; }
            .lightbox-next { right: 3px; }
            .lightbox-hint { font-size: 11px; }
        }
        @media (max-width: 500px) {
            h1 { font-size: 24px; }
            .price { font-size: 23px; }
            .main-image { height: 300px; }
            .details { padding: 18px; }
            .description-box { margin: 6px 12px 18px; padding: 16px; }
            .description-box h2 { font-size: 18px; }
            .description { font-size: 14px; }
        }
