/* ============================================================
   ECARTE TEMPLATE 3 — Styles (Gold / Elegant)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold:        #C9A84C;
    --gold-l:      #E2C47A;
    --gold-dim:    rgba(201, 168, 76, 0.14);
    --gold-bdr:    rgba(201, 168, 76, 0.32);
    --brown-dk:    #2C1A0E;
    --brown-md:    #5C3A1E;
    --brown-lt:    #8B6240;
    --beige:       #F5EDD6;
    --cream:       #FFFAF3;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

html { height: 100%; }

body {
    height: 100dvh;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    background-color: var(--beige);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: max(20px, calc(var(--safe-t) + 12px));
    padding-bottom: max(104px, calc(var(--safe-b) + 92px));
    padding-left: 16px;
    padding-right: 16px;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

/* Fond texturé points */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(92,58,30,0.11) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
}
/* Vignette bords */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 45%, rgba(139,98,64,0.15) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ---- CARTE ---- */
.card-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    animation: cardIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.card-wrap.has-badge {
    padding-top: 35px;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--cream);
    border: 1px solid var(--gold-bdr);
    border-radius: 4px;
    box-shadow:
        0 0 0 4px var(--cream),
        0 0 0 5px var(--gold-bdr),
        0 20px 60px rgba(44,26,14,0.16),
        0 4px 16px rgba(44,26,14,0.07);
    overflow-y: auto;
    scrollbar-width: none;
    max-height: calc(100dvh - max(104px, calc(var(--safe-b) + 92px)) - max(20px, calc(var(--safe-t) + 12px)) - 8px);
    position: relative;
}
.card::-webkit-scrollbar { display: none; }

/* Filigrane */
.card::before {
    content: '3G';
    position: absolute;
    top: 10px;
    right: 14px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: rgba(201,168,76,0.07);
    letter-spacing: -0.04em;
    pointer-events: none;
    z-index: 0;
    line-height: 1;
}

/* Bandeaux décoratifs */
.deco-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--brown-dk) 0%, var(--gold) 40%, var(--gold-l) 60%, var(--gold) 80%, var(--brown-dk) 100%);
}

/* ---- HEADER ---- */
.card-header {
    padding: 28px 24px 18px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.photo-wrap {
    display: inline-block;
    position: relative;
    margin-bottom: 16px;
}
/* Anneau marron externe */
.photo-wrap::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--brown-dk);
}
/* Anneau or interne */
.photo-wrap::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid var(--gold);
}
.photo-inner {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    position: relative;
    z-index: 1;
}
.photo-inner img {
    width: 100%;
    /*height: 100%;*/
    object-fit: cover;
    display: block;
}
.agent-photo.is-fallback {
    object-fit: contain;
    object-position: center;
    padding: 16px;
    background: rgba(201,168,76,0.08);
}

@keyframes btnIn {
    from { opacity: 0; transform: translateY(14px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ---- BADGE STATUT ---- */
.status-badge {
    position: absolute;
    top: 0;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 9px;
    border-radius: 20px;
    background: #fffaf3;
    border: 1px solid var(--gold-bdr);
    font-size: 0.67rem;
    font-weight: 600;
    font-family: 'Cormorant Garamond', Georgia, serif;
    letter-spacing: 0.04em;
    color: var(--brown-dk);
    z-index: 20;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(44,26,14,0.14);
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot.dispo {
    background: #3a8a3a;
    box-shadow: 0 0 0 0 rgba(58,138,58,0.6);
    animation: pulseDot 2s ease-out infinite;
}
.status-dot.indispo {
    background: #e03535;
}
.status-dot.custom {
    background: var(--gold);
}
@keyframes pulseDot {
    0%   { box-shadow: 0 0 0 0 rgba(58,138,58,0.6); }
    70%  { box-shadow: 0 0 0 5px rgba(58,138,58,0); }
    100% { box-shadow: 0 0 0 0 rgba(58,138,58,0); }
}
@media (prefers-reduced-motion: reduce) {
    .status-dot.dispo { animation: none; }
}

/* ---- MODE BANNIÈRE ---- */
.photo-banner {
    overflow: hidden;
}
.photo-banner img {
    width: 100%;
    aspect-ratio: 9 / 5;
    object-fit: cover;
    display: block;
}
.photo-banner .agent-photo.is-fallback { background: rgba(201,168,76,0.08); }
.card-header-notop {
    padding-top: 16px;
}

/* Ornement */
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ornament-line        { flex:1; height:1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament-line.r      { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament-diamond     { width:5px; height:5px; background:var(--gold); transform:rotate(45deg); flex-shrink:0; }

.agent-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--brown-dk);
    letter-spacing: 0.01em;
    line-height: 1.15;
    margin-bottom: 5px;
}
.agent-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--gold);
    letter-spacing: 0.06em;
    transition: opacity 0.4s ease;
}

/* ---- SÉPARATEUR OR ---- */
.gold-sep {
    margin: 0 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-bdr), var(--gold), var(--gold-bdr), transparent);
}

/* ---- BOUTONS D'ACTION ---- */
.actions {
    padding: 16px 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    position: relative;
    z-index: 2;
}
.action-btn {
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 6px;
    background: transparent;
    border: 1px solid var(--gold-bdr);
    border-radius: 3px;
    text-decoration: none;
    color: var(--brown-dk);
    font-family: 'Jost', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.09s;
    animation: btnIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--i, 0) * 55ms + 260ms);
}
.action-btn:active {
    background: var(--gold-dim);
    border-color: var(--gold);
    transform: scale(0.93);
}
.action-btn i,
.action-btn svg {
    font-size: 1.1rem;
    color: var(--gold);
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    will-change: transform;
}

/* ---- RÉSEAUX SOCIAUX ---- */
.socials {
    padding: 2px 24px 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 3px;
    background: transparent;
    border: 1px solid var(--gold-bdr);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gold);
    font-size: 1rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.18s, color 0.18s, transform 0.09s;
    animation: btnIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms + 600ms);
}
.social-btn:active {
    background: var(--gold-dim);
    color: var(--brown-dk);
    transform: scale(0.88);
}

/* ---- FOOTER CARTE ---- */
.card-footer {
    padding: 10px 24px 12px;
    text-align: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.7rem;
    color: var(--brown-lt);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.card-footer::before,
.card-footer::after {
    content: '';
    width: 28px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(201,168,76,0.5));
    flex-shrink: 0;
}
.card-footer::after {
    background: linear-gradient(to left, transparent, rgba(201,168,76,0.5));
}

/* ---- WIDGETS ---- */
.widgets { padding: 0 16px 18px; }

/* ---- MODALS — bottom sheet mobile ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(44,26,14,0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    overscroll-behavior: contain;
    touch-action: none;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
    background: var(--cream);
    border: 1px solid var(--gold-bdr);
    border-top: 3px solid var(--gold);
    border-radius: 20px 20px 0 0;
    padding: 16px 20px max(20px, calc(var(--safe-b) + 12px));
    width: 100%;
    max-width: 480px;
    text-align: center;
    transform: translateY(40px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-handle {
    width: 36px;
    height: 3px;
    background: var(--gold-bdr);
    border-radius: 2px;
    margin: 0 auto 14px;
}
.modal-box img { max-width: 160px; border-radius: 3px; border: 1px solid var(--gold-bdr); margin-bottom: 4px; }
.modal-share-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    margin-top: 10px;
    background: transparent;
    border: 1px solid var(--gold-bdr);
    border-radius: 3px;
    color: var(--brown-dk);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Jost', sans-serif;
    letter-spacing: 0.04em;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s;
}
.modal-share-btn i { color: var(--gold); font-size: 1.1rem; width: 20px; text-align: center; }
.modal-share-btn:active { background: var(--gold-dim); }
.modal-close {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--brown-lt);
    font-size: 0.8rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-family: 'Jost', sans-serif;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

a { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    .card-wrap, .action-btn, .social-btn { animation: none; }
}

@media (max-width: 350px) {
    .actions { gap: 7px; padding: 12px 12px; }
    .action-btn { min-height: 58px; font-size: 0.67rem; }
    .agent-name { font-size: 1.35rem; }
}

/* ============================================================
   CARROUSEL AVIS
   ============================================================ */
.avis-carousel { margin-top: 5px; position: relative; }
.avis-clip { overflow: hidden; }
.avis-track { display: flex; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.avis-slide { min-width: 100%; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.avis-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.avis-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(201,168,76,0.25); transition: background 0.3s, transform 0.3s; }
.avis-dot.active { background: var(--gold); transform: scale(1.3); }

/* ---- Widget Immodvisor ---- */
.widget-immodvisor-wrap {
    transform: scale(0.85);
    transform-origin: top center;
    margin-bottom: calc(205px * 0.85 - 205px);
}
#imdw-footer-horizontal { width: 100% !important; max-width: 100% !important; overflow: hidden !important; box-sizing: border-box !important; }
#imdw-footer-horizontal * { border-color: transparent !important; outline: none !important; }
#imdw-footer-horizontal > div, #imdw-footer-horizontal [class*="imdw"] { border: none !important; box-shadow: none !important; }
#imdw-footer2-container { display: flex !important; flex-direction: column !important; width: 100% !important; max-width: 100% !important; overflow: hidden !important; box-sizing: border-box !important; background: #fffaf3 !important; }

/* ---- Widget Meilleurs Agents ---- */
.widget-ma-wrap { text-align: center; transform: scale(1.1); transform-origin: top center; margin-bottom: calc(50px * 1.2 - 50px); }
#ma_w_wrapper { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 10px !important; background: transparent !important; border: none !important; box-shadow: none !important; }
#ma_w_wrapper a.ma-widget-feedback-stars, #ma_w_wrapper div { background: transparent !important; background-color: transparent !important; border: none !important; box-shadow: none !important; }
#ma_w_wrapper .ma-widget-link { color: #1e91ff !important; }

/* ---- Widget Google Reviews (adapté thème clair T3) ---- */
.widget-google-wrap { padding: 12px 16px 8px; width: 100%; text-align: center; }
.google-slide-header { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.google-rating-big { font-size: 2rem; font-weight: 800; color: var(--brown-dk); line-height: 1; margin-bottom: 5px; }
.google-stars { display: flex; justify-content: center; gap: 2px; margin-bottom: 4px; }
.google-count { font-size: 0.75rem; color: var(--brown-lt); margin-bottom: 10px; }

/* ============================================================
   BOUTONS D'ANGLE BAS — T3 Premium
   ============================================================ */
.corner-btn {
    position: fixed;
    bottom: 0;
    z-index: 89;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 24px calc(14px + env(safe-area-inset-bottom, 0px)) 24px;
    background: rgba(245,237,214,0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(201,168,76,0.5);
    box-shadow: 0 -6px 20px rgba(44,26,14,0.1);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.corner-btn:active { background: rgba(201,168,76,0.18); }
.corner-btn-left  { left: 0;  border-radius: 0 20px 0 0; border-left: none; border-bottom: none; }
.corner-btn-right { right: 0; border-radius: 20px 0 0 0; border-right: none; border-bottom: none; }
.corner-btn span  { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 0.72rem; font-weight: 700; color: rgba(44,26,14,0.75); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }

/* ============================================================
   BOTTOM SHEET : MES DERNIERS BIENS — T3 Premium
   ============================================================ */
.biens-fab {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: 50%; transform: translateX(-50%);
    z-index: 90;
    background: #C9A84C;
    color: #2C1A0E;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    border: none;
    border-radius: 100px;
    padding: 10px 22px;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 20px rgba(201,168,76,0.45), 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    white-space: nowrap;
    animation: fabIn 0.5s 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
    transition: transform 0.15s;
}
.biens-fab:active { transform: translateX(-50%) scale(0.96); }
@keyframes fabIn { from{opacity:0;transform:translateX(-50%) translateY(16px)}to{opacity:1;transform:translateX(-50%) translateY(0)} }

.biens-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(44,26,14,0.5);
    backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.28s ease;
}
.biens-overlay.open { opacity: 1; pointer-events: all; }

.biens-sheet {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 101;
    background: #FFFAF3;
    border-top: 2px solid #C9A84C;
    border-radius: 24px 24px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 70vh;
}
.biens-sheet.open { transform: translateY(0); }

.biens-handle { width: 36px; height: 3px; background: rgba(201,168,76,0.4); border-radius: 2px; margin: 12px auto 0; }

.biens-sheet-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px 10px;
    border-bottom: 1px solid rgba(201,168,76,0.2);
}
.biens-sheet-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem; font-weight: 700; color: #2C1A0E;
    display: flex; align-items: center; gap: 8px;
}
.biens-sheet-title span {
    background: #C9A84C; color: #fff;
    font-size: 0.65rem; font-weight: 700;
    padding: 2px 7px; border-radius: 100px;
    font-family: Georgia, serif;
}
.biens-close {
    background: none; border: 1px solid rgba(201,168,76,0.4);
    color: #C9A84C; width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.biens-close:active { background: rgba(201,168,76,0.1); }

.biens-scroll {
    display: flex; gap: 12px;
    overflow-x: auto; padding: 12px 20px 4px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.biens-scroll::-webkit-scrollbar { display: none; }

.bien-card {
    flex-shrink: 0; width: 165px;
    border-radius: 12px; overflow: hidden;
    background: #fff;
    border: 1px solid rgba(201,168,76,0.35);
    box-shadow: 0 2px 10px rgba(44,26,14,0.08);
    text-decoration: none; display: block;
    transition: transform 0.15s;
}
.bien-card:active { transform: scale(0.97); }
.bien-card-photo { width:100%; height:98px; object-fit:cover; display:block; background:#f5edd6; }
.bien-card-body { padding: 8px 10px; }
.bien-card-tag { font-size:0.6rem; font-weight:700; color:#C9A84C; text-transform:uppercase; letter-spacing:0.08em; margin-bottom:3px; }
.bien-card-ville { font-size:0.78rem; font-weight:600; color:#2C1A0E; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bien-card-prix { font-size:0.82rem; font-weight:700; color:#C9A84C; font-family:'Cormorant Garamond',Georgia,serif; }

.bien-card--voir-tout {
    background: rgba(201,168,76,0.04);
    border: 1px solid rgba(201,168,76,0.25);
    display: flex; align-items: center; justify-content: center;
    height: 149px;
}
.bien-card--voir-tout:active { background: rgba(201,168,76,0.10); }
.bien-card-voir-tout-inner {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 6px; padding: 12px; text-align: center;
}
.bien-card-voir-tout-plus { font-size: 1.6rem; font-weight: 300; color: var(--gold); line-height: 1; }
.bien-card-voir-tout-label { font-size: 0.72rem; font-weight: 600; color: var(--gold); letter-spacing: 0.02em; line-height: 1.3; }

/* ============================================================
   BANNIÈRE iOS PWA
   ============================================================ */
@keyframes bannerIn { from{opacity:0;transform:translateX(-50%) translateY(16px)}to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* ============================================================
   PORTRAIT — compatibilité card-left / card-right / ls-*
   ============================================================ */
.card-left  { display: block; }
.card-right { display: block; }
.ls-corner-fold { display: none; }
.ls-verso-biens { display: none; }
.deco-bar-bottom { display: block; }

/* ============================================================
   PAYSAGE — MODE SPLIT CARTE T3
   ============================================================ */
@media (orientation: landscape) and (max-height: 520px) {

    body {
        padding-top:    max(6px,  calc(var(--safe-t) + 4px));
        padding-bottom: max(6px,  calc(var(--safe-b) + 4px));
        padding-left:   max(10px, env(safe-area-inset-left,  0px));
        padding-right:  max(10px, env(safe-area-inset-right, 0px));
    }

    /* Masquer les éléments fixes portrait */
    .corner-btn  { display: none !important; }
    .biens-fab   { display: none !important; }
    .biens-sheet { max-height: none; }

    /* Badge : repositionné en haut-gauche au-dessus de la photo */
    .card-wrap           { max-width: min(740px, 100%); }
    .card-wrap.has-badge { padding-top: 0; }
    .status-badge        { top: 8px; left: 8px; right: auto; font-size: 0.65rem; padding: 4px 11px 4px 8px; z-index: 20; }

    /* Card : conteneur positionné, transparent */
    .card {
        position: relative;
        height: calc(100dvh - max(12px, calc(var(--safe-t) + 8px)) - max(12px, calc(var(--safe-b) + 8px)) - 8px);
        max-height: none;
        overflow: visible;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    /* ---- Panneau gauche 40% ---- */
    .card-left {
        position: absolute;
        left: 0; top: 0; bottom: 0;
        width: 40%;
        display: flex; flex-direction: column; align-items: stretch;
        overflow: hidden;
        border-radius: 4px 0 0 4px;
        background: var(--cream);
        border: 1px solid var(--gold-bdr);
        border-right: 1px solid var(--gold-bdr);
        box-shadow: 0 20px 60px rgba(44,26,14,0.18), 0 4px 16px rgba(44,26,14,0.08);
        z-index: 2;
    }

    /* Photo circulaire en paysage : taille proche de T2 */
    .card-left { --ls-agent-photo-size: clamp(118px, 38vh, 170px); }
    .card-left .card-header       { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 12px; }
    .card-left .card-header-notop { flex-shrink: 0; padding: 12px 14px 14px; text-align: center; width: 100%; border-top: 1px solid var(--gold-bdr); }
    .card-left .photo-wrap        { margin-bottom: 14px; }
    .card-left .photo-inner       { width: var(--ls-agent-photo-size); height: var(--ls-agent-photo-size); }
    .card-left .photo-wrap::before { inset: -4px; }
    .card-left .photo-wrap::after  { inset: -3px; }
    .card-left .ornament          { margin: 8px 0; }
    .card-left .ornament-line     { width: 24px; }
    .agent-name  { font-size: 1.1rem; letter-spacing: -0.01em; line-height: 1.2; }
    .agent-title { font-size: 0.82rem; }

    /* Photo bannière paysage */
    .card-wrap.has-badge .card-left .photo-banner { margin-top: 36px; }
    .card-left .photo-banner     { flex: 1; width: 100%; min-height: 0; overflow: hidden; }
    .card-left .photo-banner img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: unset; }
    .card-left .photo-banner .agent-photo.is-fallback { object-fit: contain; padding: 20px; }

    /* Barre déco dans card-left */
    .card-left .deco-bar         { flex-shrink: 0; }
    .deco-bar-bottom             { display: none; }

    /* ---- Panneau droit 60% ---- */
    .card-right {
        position: absolute;
        left: 40%; right: 0; top: 0; bottom: 0;
        display: flex; flex-direction: column; justify-content: flex-start;
        overflow-y: auto; scrollbar-width: none;
        border-radius: 0 4px 4px 0;
        background: var(--cream);
        border: 1px solid var(--gold-bdr);
        border-left: 1px solid transparent;
        box-shadow: 0 20px 60px rgba(44,26,14,0.12);
        z-index: 2;
    }
    .card-right::-webkit-scrollbar { display: none; }

    /* Recto : masquer actions et gold-seps, afficher widgets + socials */
    .card-right > .gold-sep      { display: none; }
    .card-right .actions         { display: none !important; }
    .card-wrap, .action-btn, .social-btn { animation: none; }

    /* Widgets — flex: 1, centré */
    .card-right { --ls-avis-scale: 1.28; --ls-avis-width: 68%; }

    .card-right .widgets {
        order: 1; flex: 1; min-height: 0;
        padding: 12px 10px 8px;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
    }
    .card-right .avis-carousel   { width: var(--ls-avis-width); max-width: 320px; transform: scale(var(--ls-avis-scale)); transform-origin: center center; }
    .card-right .avis-dots       { margin-top: 4px; }
    .widget-immodvisor-wrap      { transform: scale(0.85); transform-origin: top center; margin-bottom: calc(205px * 0.85 - 205px); margin-left: auto; margin-right: auto; }
    .widget-ma-wrap              { transform: scale(1.1); transform-origin: top center; margin-bottom: calc(50px * 1.2 - 50px); }

    /* Socials — en bas du panneau droit */
    .card-right .socials {
        order: 2; flex-shrink: 0;
        display: flex !important;
        padding: 10px 14px 12px;
        gap: 13px; flex-wrap: wrap; justify-content: center;
        border-top: 1px solid rgba(201,168,76,0.25);
        position: relative;
    }
    .card-right .socials::before {
        content: 'Retrouvez-moi sur';
        position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
        background: var(--cream);
        padding: 0 10px;
        font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase;
        color: rgba(44,26,14,0.4); white-space: nowrap;
    }
    .card-right .social-btn { width: 42px; height: 42px; font-size: 0.9rem; }

    /* Footer — en haut du panneau droit (recto) */
    .card-footer {
        position: absolute;
        left: 40%; right: 0;
        top: 6px;
        padding: 4px 0;
        z-index: 10;
    }
    .card.ls-flipped .card-footer { display: none; }

    /* ---- Bouton retournement (coin bas-droit) ---- */
    .ls-corner-fold {
        display: flex;
        position: absolute;
        bottom: 0; right: 0;
        width: 50px; height: 50px;
        background: transparent;
        border-radius: 0 0 4px 0;
        align-items: flex-end; justify-content: flex-end;
        z-index: 15;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        border: none;
        transform-origin: bottom right;
        transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), opacity 0.15s ease;
        animation: foldIn    0.55s 0.80s cubic-bezier(0.34,1.56,0.64,1) both,
                   foldPulse 3.60s 1.35s ease-in-out infinite;
    }
    .ls-corner-fold::before {
        content: '';
        position: absolute; inset: 0;
        clip-path: path('M 14 0 L 50 0 L 0 50 L 0 14 Q 0 0 14 0 Z');
        background: linear-gradient(135deg, var(--gold) 0%, rgba(201,168,76,0.55) 100%);
        border-radius: 0 0 4px 0;
        filter: drop-shadow(-2px -2px 8px rgba(44,26,14,0.25));
    }
    .ls-corner-fold:active        { transform: scale(1.12); }
    .ls-corner-fold.ls-fold-hidden { opacity: 0 !important; pointer-events: none !important; }

    @keyframes foldPulse {
        0%, 50%, 100% { transform: scale(1); }
        72%, 82%      { transform: scale(0.8); }
    }
    @keyframes foldIn {
        from { transform: scale(0.08); opacity: 0; }
        to   { transform: scale(1);    opacity: 1; }
    }

    /* ---- Animation flip ---- */
    @keyframes lsPanelFlip {
        0%   { transform: perspective(600px) rotateY(0deg);   opacity: 1; }
        38%  { transform: perspective(600px) rotateY(90deg);  opacity: 0; }
        62%  { transform: perspective(600px) rotateY(-90deg); opacity: 0; }
        100% { transform: perspective(600px) rotateY(0deg);   opacity: 1; }
    }
    .card-right.ls-flipping { animation: lsPanelFlip 0.52s cubic-bezier(0.4,0,0.2,1) both; pointer-events: none; }

    /* ---- État verso (ls-flipped) ---- */
    .card.ls-flipped .card-right          {
        justify-content: center;
        padding-bottom: 56px;
        box-sizing: border-box;
        --ls-actions-min-height: 80px;
        --ls-actions-padding-y: 15px;
        --ls-actions-gap: 10px;
        --ls-actions-font-size: 0.82rem;
        --ls-actions-icon-size: 1.42rem;
        --ls-actions-padding-top: 10px;
        --ls-actions-padding-bottom: 6px;
    }
    .card.ls-has-biens.ls-flipped .card-right { padding-bottom: 0; }
    .card.ls-flipped .card-right .widgets { display: none !important; }
    .card.ls-flipped .card-right .socials { display: none !important; }
    .card.ls-flipped .card-right .actions {
        display: grid !important;
        padding: var(--ls-actions-padding-top) 14px var(--ls-actions-padding-bottom);
        gap: var(--ls-actions-gap);
        grid-template-columns: repeat(2, 1fr);
    }
    .card.ls-flipped .card-right .action-btn {
        min-height: var(--ls-actions-min-height);
        font-size: var(--ls-actions-font-size);
        font-weight: 600;
        padding: var(--ls-actions-padding-y) 8px;
        gap: 8px;
        border-radius: 6px;
    }
    .card.ls-flipped .card-right .action-btn i,
    .card.ls-flipped .card-right .action-btn svg { font-size: var(--ls-actions-icon-size); }

    /* Bouton Mes Biens — verso uniquement */
    .ls-verso-biens {
        margin: 6px 12px 4px;
        padding: 10px 16px;
        background: var(--gold);
        color: var(--brown-dk) !important;
        font-family: 'Cormorant Garamond', Georgia, serif;
        font-size: 0.9rem; font-weight: 700;
        letter-spacing: 0.03em;
        border: none; border-radius: 100px;
        align-items: center; justify-content: center; gap: 7px;
        cursor: pointer;
        width: calc(100% - 20px);
        box-shadow: 0 4px 14px rgba(201,168,76,0.4);
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        text-decoration: none;
    }
    .ls-verso-biens:active { transform: scale(0.97); opacity: 0.88; }
    .card.ls-flipped .ls-verso-biens { display: flex; margin: auto; margin-bottom: 0; margin-top: 10px; width: 60%; }

}

@media (orientation: landscape) and (max-height: 430px) {
    .card-right { --ls-avis-scale: 1.24; --ls-avis-width: 70%; }
    .card.ls-flipped .card-right {
        --ls-actions-min-height: 78px;
        --ls-actions-padding-y: 14px;
        --ls-actions-gap: 9px;
        --ls-actions-font-size: 0.81rem;
        --ls-actions-icon-size: 1.36rem;
        --ls-actions-padding-top: 9px;
        --ls-actions-padding-bottom: 5px;
    }
}

@media (orientation: landscape) and (max-height: 400px) {
    .card-right { --ls-avis-scale: 1.2; --ls-avis-width: 72%; }
    .card.ls-flipped .card-right {
        --ls-actions-min-height: 76px;
        --ls-actions-padding-y: 13px;
        --ls-actions-gap: 8px;
        --ls-actions-font-size: 0.79rem;
        --ls-actions-icon-size: 1.3rem;
    }
}

@media (orientation: landscape) and (max-height: 370px) {
    .card-right { --ls-avis-scale: 1.1; --ls-avis-width: 76%; }
    .card.ls-flipped .card-right {
        --ls-actions-min-height: 72px;
        --ls-actions-padding-y: 12px;
        --ls-actions-gap: 7px;
        --ls-actions-font-size: 0.76rem;
        --ls-actions-icon-size: 1.2rem;
    }
}

@media (orientation: landscape) and (max-height: 340px) {
    .card-right { --ls-avis-scale: 1.02; --ls-avis-width: 82%; }
    .card.ls-flipped .card-right {
        --ls-actions-min-height: 66px;
        --ls-actions-padding-y: 10px;
        --ls-actions-gap: 6px;
        --ls-actions-font-size: 0.72rem;
        --ls-actions-icon-size: 1.08rem;
    }
}
