/* ==========================================================================
   Découvrir — défilé plein écran (repris du défilé v2 de l'application « choudoudou »)
   Paysage Ouest / Est, deux couloirs de cartes, reflet dans le lac. Clair / sombre, RTL.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
.dv-body {
    --navy: #1f3a53; --navy-soft: #5b7286; --line: rgba(31, 58, 83, .12); --seal: #bf3a2f;
    --west: #2f639a; --east: #a4543a;
    min-height: 100vh; color: var(--navy); background: #eef4fa;
    font-family: 'Plus Jakarta Sans', Inter, system-ui, var(--cjk), -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
}
html.js, html.js .dv-body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.dv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ----- Paysage (léger parallaxe) et rayon de lumière ----- */
.dv-scene { position: fixed; inset: 0; z-index: 0; transform: scale(1.06); will-change: transform;
    background: #eef4fa url('../img/brand/bg-laptop.webp') center / cover no-repeat; }
.dv-scene::after { content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,.72) 0%, rgba(255,255,255,.28) 22%, rgba(255,255,255,.1) 60%, rgba(255,255,255,.35) 100%); }
.dv-beam { position: fixed; left: 50%; top: 14%; bottom: 0; width: 120px; transform: translateX(-50%); z-index: 5; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.55) 35%, rgba(255,244,220,.45) 62%, rgba(255,255,255,0));
    filter: blur(18px); mix-blend-mode: screen; animation: dv-beam 6s ease-in-out infinite; }
@keyframes dv-beam { 0%, 100% { opacity: .35; width: 110px; } 50% { opacity: .8; width: 150px; } }

/* ----- En-tête : ma carte · KYSKAN · menu ----- */
.dv-top { position: fixed; top: 0; left: 0; right: 0; z-index: 300; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; justify-items: center;
    padding: max(14px, env(safe-area-inset-top)) 18px 16px;
    background: linear-gradient(to bottom, rgba(255,255,255,.94) 0%, rgba(255,255,255,.88) 70%, rgba(255,255,255,0) 100%);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.dv-round { position: relative; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; list-style: none;
    color: var(--navy); text-decoration: none; border: 1.5px solid rgba(31,58,83,.35); background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: .15s; }
.dv-round::-webkit-details-marker { display: none; }
.dv-round:hover { background: #fff; border-color: var(--navy); }
.dv-round:focus-visible, .kc:focus-visible, .dv-chev:focus-visible, .dv-y:focus-visible { outline: 3px solid #6d3dff; outline-offset: 3px; }
.dv-round b { font-size: 11px; }
.dv-brand { display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; color: var(--navy); min-width: 0; }
.dv-word { display: inline-flex; align-items: center; gap: .5em; font-size: 26px; font-weight: 400; letter-spacing: .42em; padding-inline-start: .42em; line-height: 1; direction: ltr; }
.dv-word img { width: 36px; height: auto; margin-inline-end: -.1em; filter: drop-shadow(0 2px 5px rgba(29,78,216,.25)); }
.dv-tagline { font-size: 8.5px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--navy-soft); padding-inline-start: .32em; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }

/* Menu (roue crantée) */
.dv-menu { position: relative; }
.dv-panel { position: absolute; top: 52px; inset-inline-end: 0; z-index: 400; width: min(300px, calc(100vw - 24px)); padding: 8px; display: flex; flex-direction: column;
    background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 22px 60px rgba(20,40,70,.22); }
.dv-panel a { padding: 11px 14px; border-radius: 12px; color: var(--navy); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.dv-panel a:hover, .dv-panel a[aria-current] { background: #eef3fb; }
.dv-panel__sep { height: 1px; margin: 6px 10px; background: var(--line); }
.dv-panel__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px; }
.dv-panel .lang-switch summary { border: 1px solid var(--line); }

/* Recherche repliée (loupe sous le profil) */
.dv-search { position: fixed; top: 82px; inset-inline-start: 18px; z-index: 250; }
.dv-searchpanel { margin-top: 8px; width: min(420px, calc(100vw - 36px)); padding: 12px; background: rgba(255,255,255,.95); border: 1px solid var(--line);
    border-radius: 18px; box-shadow: 0 16px 40px rgba(40,78,120,.16); }
.dv-form { display: flex; gap: 8px; margin-bottom: 10px; }
.dv-form input, .dv-form select { min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 14px; color: var(--navy); background: #f6f9fc; }
.dv-form input { flex: 1; }
.dv-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 40vh; overflow-y: auto; }
.dv-chip { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--navy); background: #fff; border: 1px solid var(--line); }
.dv-chip:hover { border-color: var(--navy); }
.dv-chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.dv-listlink { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: #1d4ed8; text-decoration: none; }

/* ----- Le triangle au point de fuite (il respire), compteur, WEST / EAST ----- */
.dv-y { position: fixed; top: 84px; left: 50%; z-index: 60; transform: translateX(-50%); -webkit-user-drag: none; }
.dv-y img { display: block; width: 110px; height: auto; animation: dv-pulse 2.8s ease-in-out infinite; -webkit-user-drag: none; }
@keyframes dv-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 6px 16px rgba(63,120,171,.35)); }
    50% { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(120,200,255,.95)) drop-shadow(0 10px 26px rgba(63,120,171,.6)); }
}
.dv-sky { position: fixed; top: 150px; z-index: 12; font-size: 15px; font-weight: 300; letter-spacing: .6em; color: rgba(31,58,83,.45); text-shadow: 0 1px 10px rgba(255,255,255,.8); pointer-events: none; direction: ltr; }
.dv-sky--west { inset-inline-start: 12%; }
.dv-sky--east { inset-inline-end: 12%; color: rgba(150,70,45,.5); }

/* ----- Couloirs et cartes ----- */
.dv { position: fixed; inset: 0; z-index: 10; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.dv-lane { position: absolute; inset: 0; pointer-events: none; }
.dv-slot { position: absolute; left: 0; top: 0; width: var(--cw, 220px); pointer-events: auto; cursor: pointer; will-change: transform, filter, opacity; }
.dv:not(.is-ready) .dv-slot { opacity: 0 !important; }
.dv-float { width: 100%; }
.dv-slot.is-focus .dv-float { animation: dv-float 5.5s ease-in-out infinite; }
.dv-lane[data-lane="east"] .dv-slot.is-focus .dv-float { animation-delay: -2.7s; }
@keyframes dv-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.kc { display: block; width: 100%; overflow: hidden; border-radius: 22px; text-decoration: none; color: var(--navy);
    background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1.5px solid rgba(255,255,255,.95);
    transform: perspective(900px) rotateY(var(--tilt, 0deg)); transform-origin: 50% 50%; -webkit-user-drag: none; }
.kc--west { box-shadow: 0 0 0 1.5px rgba(63,120,171,.55), 0 18px 40px rgba(40,90,150,.28), 0 2px 6px rgba(20,40,70,.12); }
.kc--east { box-shadow: 0 0 0 1.5px rgba(187,102,71,.55), 0 18px 40px rgba(150,80,50,.26), 0 2px 6px rgba(20,40,70,.12); }
.dv-slot.is-focus .kc { transform: perspective(900px) rotateY(calc(var(--tilt, 0deg) * .7));
    -webkit-box-reflect: below 8px linear-gradient(to bottom, transparent 66%, rgba(255,255,255,.22)); } /* reflet dans le lac */
.kc img { -webkit-user-drag: none; pointer-events: none; }
.kc__photo { position: relative; display: block; aspect-ratio: 4 / 4.3; overflow: hidden; background: linear-gradient(170deg, #3a6d9e 0%, #5f93c4 70%, #dbe8f4 100%); }
.kc--east .kc__photo { background: linear-gradient(170deg, #c05a3c 0%, #de8a68 70%, #f7e3d9 100%); }
.kc__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.kc__photo::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background: linear-gradient(to top, rgba(255,255,255,.95), transparent); }
.kc__initials { display: grid; place-items: center; height: 88%; color: #fff; font-size: calc(var(--cw, 220px) * .36); font-weight: 500; letter-spacing: -.02em; text-shadow: 0 4px 18px rgba(0,0,0,.12); }
.kc__body { display: block; padding: 8px 13px 12px; }
.kc__name { display: flex; align-items: center; gap: 3px; font-size: 17px; font-weight: 700; line-height: 1.25; }
.kc__n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc__premium { margin-inline-start: 3px; color: #d8a93f; font-size: 13px; }
.kc__line { display: block; min-height: 1.4em; margin-top: 2px; font-size: 12px; color: var(--navy-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.kc__loc { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-size: 11px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc__loc svg { flex-shrink: 0; }
.kc__nets { display: flex; gap: 5px; flex-shrink: 0; }
.kc__nets i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.kc__nets svg { width: 13px; height: 13px; }

/* Glisser le triangle jusqu'au chevron : SkanAll */
.dv-y { cursor: grab; touch-action: none; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.dv-y.is-grabbed { cursor: grabbing; z-index: 500; }
.dv-y.is-grabbed img { animation: none; filter: drop-shadow(0 14px 30px rgba(29,78,216,.45)); }
.dv-y.is-returning { transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.dv-y.is-dropped { z-index: 500; transition: transform .26s ease-in, opacity .26s ease-in; opacity: 0; }
.dv-chev__label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
    white-space: nowrap; color: var(--seal); opacity: 0; transition: opacity .2s; pointer-events: none; text-shadow: 0 1px 8px rgba(255,255,255,.95); }
body.dv-dragging-y .dv-chev { width: 78px; height: 78px; bottom: max(40px, env(safe-area-inset-bottom)); border-radius: 50%; animation: none;
    background: rgba(255,255,255,.72); border: 2px dashed rgba(191,58,47,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    transition: transform .2s, background .2s, border-color .2s; }
body.dv-dragging-y .dv-chev__label { opacity: 1; }
.dv-chev.is-hot { transform: translateX(-50%) scale(1.18) !important; background: rgba(255,255,255,.95) !important; border-style: solid !important; border-color: var(--seal) !important;
    box-shadow: 0 0 0 8px rgba(191,58,47,.14), 0 10px 30px rgba(191,58,47,.3); }
:root[data-theme="dark"] body.dv-dragging-y .dv-chev { background: rgba(16,26,70,.75); }

/* ----- Chevron (SkanAll) et mentions ----- */
.dv-chev { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; z-index: 60; transform: translateX(-50%); color: var(--seal); display: grid; place-items: center;
    filter: drop-shadow(0 0 6px rgba(255,255,255,.95)) drop-shadow(0 2px 6px rgba(191,58,47,.35)); animation: dv-bounce 1.6s ease-in-out infinite; }
@keyframes dv-bounce { 50% { transform: translate(-50%, 5px); } }
.dv-legal { position: fixed; bottom: 10px; inset-inline-end: 16px; z-index: 60; font-size: 11px; color: var(--navy-soft); }
.dv-legal .legal-links { gap: 4px 12px; font-size: 11px; }
.dv-legal a { color: inherit; text-shadow: 0 1px 6px rgba(255,255,255,.9); }

/* Vide / sans JavaScript */
.dv-empty { position: fixed; left: 50%; top: 58%; z-index: 70; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); padding: 26px 22px; text-align: center;
    background: rgba(255,255,255,.9); border-radius: 24px; box-shadow: 0 18px 44px rgba(40,78,120,.16); color: var(--navy-soft); line-height: 1.5; }
.dv-empty__title { margin-top: 0; font-size: 19px; font-weight: 800; color: var(--navy); }
.dv-btn { display: inline-block; margin-top: 6px; padding: 12px 22px; border-radius: 999px; color: #fff; font-weight: 700; text-decoration: none; background: linear-gradient(95deg, #1a5cf0, #6d3dff); }
.dv-nojs { display: none; }
html:not(.js) .dv { position: relative; z-index: 10; padding: 300px 16px 90px; touch-action: auto; }
html:not(.js) .dv-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; max-width: 1100px; margin: 0 auto; }
html:not(.js) .kc { transform: none; }
html:not(.js) .dv-nojs { display: block; text-align: center; font-weight: 700; }

/* ----- Téléphone ----- */
@media (max-width: 700px) {
    .dv-scene { background-image: url('../img/brand/bg-mobile.webp'); }
    .dv-top { padding-left: 14px; padding-right: 14px; }
    .dv-word { font-size: 21px; letter-spacing: .34em; padding-inline-start: .34em; }
    .dv-word img { width: 28px; }
    .dv-tagline { font-size: 7px; letter-spacing: .22em; }
    .dv-search { top: 78px; inset-inline-start: 14px; }
    .dv-y { top: 84px; }
    .dv-y img { width: 84px; }
    .dv-sky { top: 132px; font-size: 13px; letter-spacing: .45em; }
    .dv-sky--west { inset-inline-start: 7%; } .dv-sky--east { inset-inline-end: 7%; }
    .kc { border-radius: 18px; }
    .kc__body { padding: 7px 10px 10px; }
    .kc__name { font-size: 14px; }
    .kc__line { font-size: 10.5px; }
    .kc__nets i { width: 22px; height: 22px; border-radius: 7px; }
    .kc__nets i:nth-child(n+3) { display: none; }
    .dv-legal { display: none; }
}

/* ----- Mode sombre ----- */
:root[data-theme="dark"] .dv-body { --navy: #eef3ff; --navy-soft: #a9b6d8; --line: rgba(255,255,255,.14); --west: #8fb4ff; --east: #ffb08f; background: #081033; color-scheme: dark; }
:root[data-theme="dark"] .dv-scene { filter: brightness(.58) saturate(1.2); }
:root[data-theme="dark"] .dv-scene::after { background: linear-gradient(to bottom, rgba(6,12,42,.8) 0%, rgba(6,12,42,.35) 25%, rgba(6,12,42,.1) 60%, rgba(6,12,42,.5) 100%); }
:root[data-theme="dark"] .dv-beam { mix-blend-mode: screen; opacity: .5; }
:root[data-theme="dark"] .dv-top { background: linear-gradient(to bottom, rgba(8,16,51,.94) 0%, rgba(8,16,51,.85) 70%, rgba(8,16,51,0) 100%); }
:root[data-theme="dark"] .dv-round { background: rgba(16,26,70,.6); border-color: rgba(255,255,255,.28); }
:root[data-theme="dark"] .dv-round:hover { background: rgba(16,26,70,.9); border-color: #fff; }
:root[data-theme="dark"] .dv-panel, :root[data-theme="dark"] .dv-searchpanel, :root[data-theme="dark"] .dv-empty { background: rgba(14,22,58,.97); }
:root[data-theme="dark"] .dv-panel a:hover, :root[data-theme="dark"] .dv-panel a[aria-current] { background: rgba(255,255,255,.08); }
:root[data-theme="dark"] .dv-form input, :root[data-theme="dark"] .dv-form select, :root[data-theme="dark"] .dv-chip { background: rgba(255,255,255,.06); }
:root[data-theme="dark"] .dv-chip.is-on { background: #eef3ff; color: #0b1433; }
:root[data-theme="dark"] .dv-listlink { color: #8fb4ff; }
:root[data-theme="dark"] .dv-sky { color: rgba(200,215,255,.5); text-shadow: none; }
:root[data-theme="dark"] .dv-sky--east { color: rgba(255,190,160,.55); }
:root[data-theme="dark"] .kc { background: rgba(16,26,70,.78); border-color: rgba(255,255,255,.16); }
:root[data-theme="dark"] .kc__photo::after { background: linear-gradient(to top, rgba(16,26,70,.95), transparent); }
:root[data-theme="dark"] .kc__nets i { background: rgba(255,255,255,.92); }
:root[data-theme="dark"] .dv-slot.is-focus .kc { -webkit-box-reflect: below 8px linear-gradient(to bottom, transparent 66%, rgba(255,255,255,.12)); }
:root[data-theme="dark"] .dv-legal a { text-shadow: none; }

@media (prefers-reduced-motion: reduce) {
    .dv-beam, .dv-y img, .dv-chev, .dv-slot.is-focus .dv-float { animation: none; }
    .dv-y.is-returning, .dv-y.is-dropped { transition: none; }
    .dv-scene { transform: none; }
}
