/* ============================================================
   BLOC HERO CARTES — shokola_cartes_hero
   Porté depuis _claude_cards_hero/Shokola Hero - Cards.dc.html
   Tout est scoppé sous .shk-chero. Couleurs / fontes : variables du
   framework Kakao ; tokens locaux --chero-* pour les teintes propres
   à la maquette (sans équivalent framework).
   Positions / rotations / flou des cartes : pilotés par cartes-hero.js.
   ============================================================ */

.shk-chero {
    --chero-accent: var(--color-secondaire);
    --chero-accent-hover: var(--color-tertiaire);
    --chero-muted: #6B6156;
    --chero-text-2: #4A423A;
    --chero-mono: var(--font-1);
    --chero-corner: rgba(23, 19, 15, .18);

    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    color: var(--color-dark);
    font-family: var(--font-1);
    background: radial-gradient(120% 78% at 50% 106%, #F2EEE2 0%, #F7F4EC 42%, var(--color-paper) 78%);
}

/* --- Repères d'angle --- */
.shk-chero__corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 0 solid var(--chero-corner);
    pointer-events: none;
}
.shk-chero__corner.tl { top: 96px; left: 28px; border-left-width: 1px; border-top-width: 1px; }
.shk-chero__corner.tr { top: 96px; right: 28px; border-right-width: 1px; border-top-width: 1px; }
.shk-chero__corner.bl { bottom: 28px; left: 28px; border-left-width: 1px; border-bottom-width: 1px; }
.shk-chero__corner.br { bottom: 28px; right: 28px; border-right-width: 1px; border-bottom-width: 1px; }

/* --- Mise en page --- */
.shk-chero__in {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 0 32px 18px;
}

.shk-chero__head {
    position: relative;
    z-index: 300;
    max-width: 780px;
    margin-bottom: 0; /* annule la marge de .shk-section-head : la scène suit */
    padding-top: max(clamp(72px, 11vh, 120px), calc(var(--header-height) + 16px));
}

/* --- Scène --- */
.shk-chero__stage {
    position: relative;
    flex: 1;
    min-height: min(240px, 34vh);
    margin-top: -14px;
    perspective: 1600px;
    touch-action: pan-y;
    cursor: grab;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}
.shk-chero__stage.is-dragging { cursor: grabbing; }
.shk-chero__stage:focus-visible {
    outline: 2px solid var(--chero-accent);
    outline-offset: -6px;
}

/* --- Carte --- */
.shk-chero__card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 200px;
    height: 330px;
    transform-origin: 50% 50%;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%);
    color: var(--ink);
    text-decoration: none;
    -webkit-user-drag: none;
}
.shk-chero__card:hover,
.shk-chero__card:focus { color: var(--ink); text-decoration: none; }
.shk-chero__card:focus-visible {
    outline: 2px solid var(--chero-accent);
    outline-offset: 10px;
}

.shk-chero__card-rot {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}
.shk-chero__card-fx {
    position: absolute;
    inset: 0;
    transition: filter .3s ease;
}
.shk-chero.is-floating .shk-chero__card-fx {
    animation: shkCheroFloat var(--float-dur, 6.2s) ease-in-out infinite var(--float-delay, 0s);
}
@keyframes shkCheroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

.shk-chero__card-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--bg);
    box-shadow: 0 26px 46px rgba(23, 19, 15, .22);
}

.shk-chero__card-top {
    position: absolute;
    top: 18px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.shk-chero__card-top .code {
    font-family: var(--chero-mono);
    font-size: 10px;
    letter-spacing: .14em;
    opacity: .62;
}

/* Motif 2x2 : quarts de disque / carrés pleins / vides */
.shk-chero__motif {
    position: absolute;
    top: 18px;
    left: 20px;
    width: 88px;
    height: 88px;
}
.shk-chero__q {
    position: absolute;
    width: 44px;
    height: 44px;
    overflow: hidden;
}
.shk-chero__q--1 { left: 0; top: 0; }
.shk-chero__q--2 { left: 44px; top: 0; }
.shk-chero__q--3 { left: 0; top: 44px; }
.shk-chero__q--4 { left: 44px; top: 44px; }
.shk-chero__q i {
    position: absolute;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--ink);
}
.shk-chero__q i.is-empty { display: none; }
.shk-chero__q i.is-full { inset: 0; width: auto; height: auto; border-radius: 0; }
.shk-chero__q i.is-tl { left: -44px; top: -44px; }
.shk-chero__q i.is-tr { left: 0; top: -44px; }
.shk-chero__q i.is-bl { left: -44px; top: 0; }
.shk-chero__q i.is-br { left: 0; top: 0; }

.shk-chero__card-name {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 126px;
    font-family: var(--font-1);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.14;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.shk-chero__card-rule {
    position: absolute;
    left: 20px;
    bottom: 112px;
    width: 30px;
    height: 1.5px;
    background: var(--ink);
    opacity: .35;
}
.shk-chero__card-tagline {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 46px;
    font-size: 13px;
    line-height: 1.4;
    opacity: .95;
    text-wrap: pretty;
}
.shk-chero__card-cta {
    position: absolute;
    left: 20px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--chero-mono);
    font-size: 10.5px;
    font-weight: 500;
}

/* Libellé sous la carte (échelle compensée en JS) */
.shk-chero__card-meta {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding-top: 18px;
    text-align: center;
    transform-origin: top center;
    transition: opacity .3s ease;
}
.shk-chero__card-meta span {
    display: inline-block;
    max-width: 276px;
    font-family: var(--chero-mono);
    font-size: 10.5px;
    line-height: 1.3;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--chero-text-2);
    white-space: normal;
    text-wrap: balance;
}

/* --- Infos de la carte active + navigation --- */
.shk-chero__info {
    position: relative;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 14px;
}
.shk-chero__active-name {
    margin: 0;
    min-width: min(560px, 64vw);
    text-align: center;
    font-family: var(--font-1);
    font-weight: 900;
    font-size: clamp(20px, min(3vw, 4.4vh), 44px);
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--color-dark);
}
.shk-chero__active-desc {
    margin: 0;
    max-width: min(560px, 84vw);
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: #574F46;
    text-wrap: pretty;
}
.shk-chero__active-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--chero-accent);
    text-decoration: none;
}
.shk-chero__active-link:hover { color: var(--chero-accent-hover); }
.shk-chero__active-link .arrow { font-family: var(--chero-mono); }

.shk-chero__nav {
    display: flex;
    align-items: center;
    gap: 16px;
}
.shk-chero__btn {
    flex: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(23, 19, 15, .2);
    background: rgba(255, 255, 255, .7);
    color: #3A332C;
    font-family: var(--chero-mono);
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.shk-chero__btn:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-paper);
}
.shk-chero__btn:focus-visible {
    outline: 2px solid var(--chero-accent);
    outline-offset: 2px;
}
.shk-chero__progress {
    width: min(440px, 54vw);
    height: 2px;
    border-radius: 2px;
    background: rgba(23, 19, 15, .14);
    overflow: hidden;
}
.shk-chero__progress-bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--color-secondaire), #C4711E 50%, var(--color-tertiaire));
    transition: width .25s ease;
}
.shk-chero__hint {
    margin: 0;
    font-family: var(--chero-mono);
    font-size: 9.5px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--chero-muted);
    text-align: center;
}

@media (max-width: 767px) {
    .shk-chero__in { padding: 0 var(--rem-1-md) 18px; }
    .shk-chero__corner { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .shk-chero.is-floating .shk-chero__card-fx { animation: none; }
    .shk-chero__card-fx,
    .shk-chero__progress-bar { transition: none; }
}
