/* ==========================================================================
   JC Virtual Tour - blocs repris de la v2 (style.css), à l'identique
   « Comment ça marche », FAQ et slider photo / 360°. Chargé après site.css.
   Les variables de la v2 sont redéfinies ici à partir de leurs valeurs d'origine.
   ========================================================================== */

:root {
    --bg-secondary: #09090A;
    --bg-tertiary: #111113;
    --bg-card: #111113;
    --text-primary: #F5F5F0;
    --text-secondary: #B8B8B0;
    --text-muted: #6E6E68;
    --border: rgba(255, 255, 245, 0.08);
    --border-light: rgba(255, 255, 245, 0.16);
    --yellow-grad: linear-gradient(135deg, #FFD43A 0%, #F59E0B 100%);
    --radius-lg: 20px;
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55), 0 40px 100px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
    --bg-secondary: #F2F0EA;
    --bg-tertiary: #ECEAE3;
    --bg-card: #FFFFFF;
    --text-primary: #0E0E0C;
    --text-secondary: #4A4A45;
    --text-muted: #8A8A82;
    --border: rgba(14, 14, 12, 0.08);
    --border-light: rgba(14, 14, 12, 0.16);
    --shadow-lg: 0 10px 30px rgba(14, 14, 12, 0.08), 0 30px 80px rgba(14, 14, 12, 0.10);
}

/* ======================================================
   COMMENT ÇA MARCHE - HOW IT WORKS
   ====================================================== */
.how-section { position: relative; }

.how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    position: relative;
}

.how-connector {
    position: absolute;
    top: 68px;
    left: 12.5%; right: 12.5%;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        var(--border-light) 0 6px,
        transparent 6px 12px
    );
    z-index: 0;
    pointer-events: none;
}

.how-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    z-index: 1;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.how-card:hover {
    border-color: var(--border-light);
    transform: translateY(-3px);
}

.how-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.how-step-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--accent);
    font-family: inherit;
}

.how-step-badge {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--yellow-grad);
    display: grid;
    place-items: center;
    color: #0E0E0C;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

/* Step art area */
.how-art {
    background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-secondary));
    border: 1px solid var(--border);
    border-radius: 14px;
    height: 110px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.how-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.how-card p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

/* ── Step art animations ── */

/* Step 1: paper with lines */
.how-art-doc {
    width: 66px; height: 80px;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid var(--border-light);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transform: rotate(-3deg);
    position: relative;
}

.how-art-line {
    height: 3px;
    border-radius: 2px;
    background: var(--yellow-grad);
    transform-origin: left;
    animation: lineGrow 2s ease-in-out infinite;
}
.how-art-line:nth-child(1) { width: 80%; animation-delay: 0s; }
.how-art-line:nth-child(2) { width: 60%; animation-delay: 0.15s; }
.how-art-line:nth-child(3) { width: 70%; animation-delay: 0.3s; background: var(--border-light); }
.how-art-line:nth-child(4) { width: 50%; animation-delay: 0.45s; background: var(--border-light); }

@keyframes lineGrow {
    0%   { transform: scaleX(0); }
    50%  { transform: scaleX(1); }
    100% { transform: scaleX(1); }
}

.how-art-check {
    position: absolute;
    right: -10px; bottom: -10px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--yellow-grad);
    display: grid;
    place-items: center;
    color: #0E0E0C;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 0 0 3px rgba(255,212,58,0.2);
    animation: checkPop 2s 0.8s ease-in-out infinite;
}

@keyframes checkPop {
    0%, 60%  { transform: scale(0); opacity: 0; }
    75%      { transform: scale(1.2); opacity: 1; }
    85%, 100% { transform: scale(1); opacity: 1; }
}

/* Step 2: rotating sphere */
.how-art-sphere {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border-light);
    position: relative;
    animation: sphereSpin 8s linear infinite;
    overflow: hidden;
}

@keyframes sphereSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.how-art-meridian {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(255, 212, 58, 0.35);
}

.how-art-meridian:nth-child(1) { transform: scaleX(0.3); }
.how-art-meridian:nth-child(2) { transform: scaleY(0.3); border-color: rgba(255, 212, 58, 0.25); }

.how-art-dot {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    left: 50%; top: 50%;
}

/* Step 3: scanning bar */
.how-art-panels {
    display: flex;
    gap: 5px;
    align-items: center;
    position: relative;
}

.how-art-panel {
    width: 16px; height: 64px;
    border-radius: 3px;
    border: 1px solid var(--border);
    animation: panelBob 2.2s ease-in-out infinite;
}
.how-art-panel:nth-child(1) { background: linear-gradient(180deg, #3a3a35, #2a2a25); animation-delay: 0s; }
.how-art-panel:nth-child(2) { background: linear-gradient(180deg, #4a4540, #3a352f); animation-delay: 0.1s; }
.how-art-panel:nth-child(3) { background: linear-gradient(180deg, #5a4f3d, #4a3f2d); animation-delay: 0.2s; }
.how-art-panel:nth-child(4) { background: linear-gradient(180deg, #6b5a3c, #5b4a2c); animation-delay: 0.3s; }

@keyframes panelBob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}

.how-art-seam {
    position: absolute;
    left: -4px; right: -4px;
    height: 2px;
    background: var(--yellow-grad);
    opacity: 0.8;
    animation: seamSweep 2.2s 0.4s ease-in-out infinite;
    transform-origin: left;
}

@keyframes seamSweep {
    0%   { transform: scaleX(0); transform-origin: left; }
    49%  { transform: scaleX(1); transform-origin: left; }
    50%  { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

/* Step 4: globe + pulses */
.how-art-globe {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1a3a4a, #0a1a25);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.how-art-globe-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 212, 58, 0.2);
}
.how-art-globe-ring:nth-child(1) { transform: scaleX(0.25); }
.how-art-globe-ring:nth-child(2) { transform: scaleX(0.55); }
.how-art-globe-equator {
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: rgba(255, 212, 58, 0.25);
}
.how-art-orbit-dot {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--yellow-grad);
    box-shadow: 0 0 10px var(--accent);
    left: 50%; top: 50%;
    animation: globeOrbit 4s linear infinite;
}

@keyframes globeOrbit {
    0%   { transform: translate(-50%,-50%) translate(-28px,-8px); }
    25%  { transform: translate(-50%,-50%) translate(0,-18px); }
    50%  { transform: translate(-50%,-50%) translate(28px,-8px); }
    75%  { transform: translate(-50%,-50%) translate(0,2px); }
    100% { transform: translate(-50%,-50%) translate(-28px,-8px); }
}

.how-art-pulse {
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    opacity: 0;
    animation: globePulse 2.4s ease-out infinite;
}
.how-art-pulse:nth-child(6) { animation-delay: 0s; }
.how-art-pulse:nth-child(7) { animation-delay: 0.7s; }
.how-art-pulse:nth-child(8) { animation-delay: 1.4s; }

@keyframes globePulse {
    0%   { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}


/* ======================================================
   FAQ - ACCORDION + ASIDE CARD
   ====================================================== */
.faq-section { background: none; }

.faq-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 48px;
    align-items: start;
}

.faq-aside {
    position: sticky;
    top: 100px;
}

.faq-aside-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease;
}


.faq-mark {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: var(--yellow-grad);
    color: #0E0E0C;
    font-family: var(--f-head);
    font-size: 50px;
    font-weight: 700;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    box-shadow: 0 14px 32px rgba(255, 212, 58, 0.28);
    transform: rotate(-8deg);
    line-height: 1;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-aside-card:hover .faq-mark {
    transform: rotate(4deg) scale(1.05);
}

.faq-aside-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 24px;
}

.faq-aside-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    padding: 11px 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-tertiary);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.faq-aside-cta:hover {
    border-color: rgba(255, 212, 58, 0.5);
    transform: translateX(2px);
}

.faq-aside-cta span {
    transition: transform 0.25s ease;
}

.faq-aside-cta:hover span {
    transform: translateX(3px);
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.faq-item.open {
    border-color: rgba(255, 212, 58, 0.3);
    background: rgba(255, 212, 58, 0.015);
}

.faq-toggle {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--f-head);
    transition: color 0.2s ease;
}

.faq-toggle:hover { color: var(--text-primary); }

.faq-plus {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 400;
    transition: background 0.3s ease, color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
    line-height: 1;
}

.faq-item.open .faq-plus {
    background: var(--yellow-grad);
    color: #0E0E0C;
    transform: rotate(45deg);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.open .faq-body {
    max-height: 280px;
}

.faq-answer {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
    max-width: 700px;
}



/* Labels row above the rectangle - matches container width/centering */
.compare-labels-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 980px;
    margin: 0 auto 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.compare-labels-row span:first-child {
    color: var(--text-muted);
}

.compare-labels-row span:last-child {
    color: var(--accent);
}

/* Keep 16:9 but limit width so it stays smaller */
.hero-compare .compare-container {
    aspect-ratio: 16 / 9;
    max-width: 980px;
    margin: 0 auto;
}

/* ============ COMPARE INSTRUCTION BAR ============ */
@keyframes ci-arrows {
    0%, 100% { gap: 10px; }
    50%       { gap: 20px; }
}

.compare-instruction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 980px;
    margin: 12px auto 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    animation: ci-arrows 1.6s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

.compare-instruction svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.compare-instruction.gone {
    opacity: 0;
    pointer-events: none;
}

.compare-tour-tip {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.compare-tour-tip:hover {
    background: rgba(0,0,0,0.7);
}
.compare-tour-tip .tip-bubble {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(20,20,20,0.92);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 400;
    color: #e5e5e5;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.compare-tour-tip:hover .tip-bubble {
    display: block;
}

/* The main slider rectangle */
.compare-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    --pos: 50%;
    touch-action: none;
}

/* Right panel: iframe, full bleed, sits behind */
.compare-side-right {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.compare-side-right iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    /* pointer-events toggled by JS */
}

/* Left panel: photo, clipped from right, sits on top */
.compare-side-left {
    position: absolute;
    inset: 0;
    z-index: 2;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
    /* No transition - must be instant for smooth drag */
}

.compare-side-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Invisible overlay to block iframe pointer events during drag */
.compare-drag-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}
.compare-drag-overlay.dragging {
    pointer-events: all;
}

/* Divider line */
.compare-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 2px;
    background: linear-gradient(180deg, #FFD43A 0%, #F59E0B 100%);
    box-shadow: 0 0 20px rgba(255, 212, 58, 0.55);
    transform: translateX(-1px);
    z-index: 5;
    pointer-events: none;
}

/* Drag handle */
.compare-handle {
    position: absolute;
    top: 50%;
    left: var(--pos);
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD43A 0%, #F59E0B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #0E0E0C;
    font-weight: 700;
    cursor: ew-resize;
    z-index: 6;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4), 0 0 0 4px rgba(255, 212, 58, 0.2);
    transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.compare-handle:active,
.compare-container.is-dragging .compare-handle {
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.55), 0 0 0 6px rgba(255, 212, 58, 0.25);
}

/* Pulse glow on handle until first interaction */
@keyframes handle-pulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(245,158,11,0.4), 0 0 0 4px rgba(255,212,58,0.2); }
    50%       { box-shadow: 0 6px 20px rgba(245,158,11,0.6), 0 0 0 10px rgba(255,212,58,0.0); }
}
.compare-container:not(.is-dragging) .compare-handle {
    animation: handle-pulse 2s ease-in-out infinite;
}

/* Labels */
.compare-label {
    position: absolute;
    top: 20px;
    z-index: 4;
    pointer-events: none;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.compare-label-left {
    left: 20px;
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #FFF8DC;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.compare-label-right {
    right: 20px;
    background: linear-gradient(135deg, #FFD43A 0%, #F59E0B 100%);
    color: #0E0E0C;
    font-weight: 700;
}

/* Drag hint */
.compare-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    pointer-events: none;
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #FFF8DC;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0.85;
    transition: opacity 0.4s ease;
}
.compare-hint.hidden {
    opacity: 0;
}

/* ---------- Responsive repris de style-responsive.css ---------- */

@media (max-width: 1100px) {
    .how-grid { grid-template-columns: repeat(2, 1fr); }
    .how-connector { display: none; }
}

@media (max-width: 960px) {
    .faq-layout { grid-template-columns: 1fr; gap: 28px; }
    .faq-aside { position: static; }
    .faq-aside-card { padding: 24px 22px; }
    .faq-mark { width: 64px; height: 64px; font-size: 42px; border-radius: 18px; margin-bottom: 18px; }
}

@media (max-width: 900px) {
    .compare-handle { width: 44px; height: 44px; }
}

@media (max-width: 720px) {
    .how-grid { grid-template-columns: 1fr; }
    .faq-toggle { font-size: 14px; }
}

@media (max-width: 640px) {
    .hero-compare .compare-container { aspect-ratio: 4 / 5; border-radius: 14px; }
    .compare-handle { width: 40px; height: 40px; }
}

/* ---------- Fond : halos et grain (style.css, à l'identique) ---------- */

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg);
    z-index: -1;
    overflow: hidden;
}

.bg::before {
    content: '';
    position: absolute;
    width: 75vw;
    height: 75vh;
    background: radial-gradient(ellipse, rgba(201, 162, 39, 0.1) 0%, transparent 70%);
    top: -15%;
    left: -10%;
    animation: orbFloat1 22s ease-in-out infinite alternate;
    pointer-events: none;
}

.bg::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(ellipse, rgba(201, 162, 39, 0.07) 0%, transparent 70%);
    bottom: -10%;
    right: -8%;
    animation: orbFloat2 28s ease-in-out infinite alternate;
    pointer-events: none;
}

.bg-orb3 {
    position: absolute;
    width: 50vw;
    height: 50vh;
    background: radial-gradient(ellipse, rgba(201, 162, 39, 0.05) 0%, transparent 70%);
    top: 40%;
    left: 35%;
    animation: orbFloat3 18s ease-in-out infinite alternate;
    pointer-events: none;
}

[data-theme="light"] .grain { opacity: 0.025; }
[data-theme="light"] .bg::before { background: radial-gradient(ellipse, rgba(201, 162, 39, 0.14) 0%, transparent 70%); }
[data-theme="light"] .bg::after { background: radial-gradient(ellipse, rgba(201, 162, 39, 0.09) 0%, transparent 70%); }
[data-theme="light"] .bg-orb3 { background: radial-gradient(ellipse, rgba(201, 162, 39, 0.07) 0%, transparent 70%); }

@keyframes orbFloat1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6%, 12%) scale(1.12); }
}
@keyframes orbFloat2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-8%, -10%) scale(1.18); }
}
@keyframes orbFloat3 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, -8%) scale(1.08); }
}
