/* ════════════════════════════════════════════════════════
   Accueil — Sourichith's Planning Poker
   Chaleureux, amical, inspiré des jeux mobiles
   ════════════════════════════════════════════════════════ */

.home {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 36px;
    overflow: hidden;
    font-family: 'Nunito', 'Inter', sans-serif;
}

/* ── Cartes flottantes en décor ── */
.home-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hs-card {
    --ink: #ff8a3d; --bd: #ffb25c; --sh: #f2a95a; --s1: #ff8a3d; --s2: #ffa75f;
    position: absolute;
    left: var(--x); top: var(--y);
    width: 58px; height: 82px;
    display: grid; place-items: center;
    background: #fff;
    border: 3px solid var(--bd);
    border-radius: 12px;
    box-shadow: 0 4px 0 var(--sh);
    color: var(--ink);
    font: 700 28px/1 'Fredoka', sans-serif;
    opacity: .85;
    rotate: var(--r);
    animation: hs-float 6s ease-in-out infinite alternate;
    animation-delay: var(--d);
}
.hs-card.c-teal   { --ink: #12a58b; --bd: #3ee0b0; --sh: #62c4a6; --s1: #12a58b; --s2: #3ee0b0; }
.hs-card.c-purple { --ink: #8b5cf6; --bd: #c4b5fd; --sh: #a78bfa; --s1: #8b5cf6; --s2: #a78bfa; }
.hs-card.c-pink   { --ink: #ec4899; --bd: #f9a8d4; --sh: #f472b6; --s1: #ec4899; --s2: #f472b6; }
.hs-card.c-yellow { --ink: #d97706; --bd: #fcd34d; --sh: #f6b73c; --s1: #f59e0b; --s2: #fcd34d; }
@keyframes hs-float {
    from { translate: 0 0; }
    to   { translate: 0 -16px; }
}

/* Cartes retournées : dos à motif */
.hs-card.back {
    border-color: #fff;
    background: repeating-linear-gradient(45deg, var(--s1) 0 7px, var(--s2) 7px 14px);
    box-shadow: 0 4px 0 var(--sh), inset 0 0 0 3px var(--ink);
    opacity: .8;
}
.hs-card.back::after {
    content: '';
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ink);
}

/* ── Titre ── */
.home-head { position: relative; z-index: 2; text-align: center; }
.home-kicker {
    display: inline-block;
    padding: 4px 18px;
    background: #fff;
    border: 3px solid #ffd9a8;
    border-radius: 99px;
    box-shadow: 0 3px 0 #f6c58a;
    color: #c2410c;
    font: 600 15px/1.4 'Fredoka', sans-serif;
}
.home-title {
    margin: 14px 0 8px;
    color: #c2410c;
    font: 700 clamp(34px, 7vw, 68px)/1.05 'Fredoka', sans-serif;
    letter-spacing: -1px;
}
.home-title span {
    display: block;
    background: linear-gradient(90deg, #ff8a3d, #ff5d73);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 0 #ffd9a8);
}
.home-sub {
    color: #8a5a3a;
    font-size: clamp(14px, 2.4vw, 18px);
    font-weight: 700;
}

/* ── Scène : avatar + bras + pancartes ── */
.home-scene {
    position: relative;
    z-index: 1;
    width: min(100%, 880px);
    aspect-ratio: 900 / 520;
    margin-top: 12px;
    container-type: inline-size;
}
.home-scene > svg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    overflow: visible;
    pointer-events: none;
}
.home-svg-front { z-index: 3; }

.home-sign {
    position: absolute;
    z-index: 2;
    top: 21.15%;
    width: 27.78%;
    height: 30.77%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .2cqw;
    padding: 1cqw 1cqw 3.4cqw;
    border: .9cqw solid #fff;
    border-radius: 3cqw;
    color: #fff;
    font-family: 'Fredoka', sans-serif;
    cursor: pointer;
    transform-origin: 50% 100%;
    transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), filter .2s;
}
.home-sign-xhe {
    left: 2.78%;
    transform: rotate(-4deg);
    background: linear-gradient(160deg, #ffb347, #ff6b4a);
    box-shadow: 0 1.2cqw 0 #d9482f, 0 2.6cqw 3cqw rgba(217, 72, 47, .3);
}
.home-sign-cgi {
    right: 2.78%;
    transform: rotate(4deg);
    background: linear-gradient(160deg, #a855f7, #ec4899);
    box-shadow: 0 1.2cqw 0 #7e22ce, 0 2.6cqw 3cqw rgba(126, 34, 206, .3);
}
.home-sign-xhe:hover, .home-sign-xhe:focus-visible { transform: rotate(-1deg) translateY(-1.2cqw) scale(1.05); filter: brightness(1.06); }
.home-sign-cgi:hover, .home-sign-cgi:focus-visible { transform: rotate(1deg) translateY(-1.2cqw) scale(1.05); filter: brightness(1.06); }

/* Petite pancarte sur le corps (cordon au cou) */
.home-sign-sibi {
    left: 41.33%;
    top: 75.4%;
    width: 17.33%;
    height: 16.9%;
    padding: .4cqw;
    border-width: .6cqw;
    border-radius: 1.6cqw;
    gap: 0;
    transform-origin: 50% 0;
    transform: rotate(-2deg);
    background: linear-gradient(160deg, #3ee0b0, #12a58b);
    box-shadow: 0 .8cqw 0 #0b7d6a, 0 1.6cqw 2cqw rgba(11, 125, 106, .3);
}
.home-sign-sibi .home-sign-label { font-size: max(7px, 2cqw); }
.home-sign-sibi .home-sign-name { font-size: max(13px, 4.8cqw); text-shadow: 0 .3cqw 0 rgba(0, 0, 0, .18); }
.home-sign-sibi:hover, .home-sign-sibi:focus-visible { transform: rotate(2deg) scale(1.08); filter: brightness(1.06); }
.home-sign-sibi:active { transform: rotate(0) scale(.97); }

.home-sign:active { transform: rotate(0) translateY(.4cqw) scale(.98); }
.home-sign:focus-visible { outline: 3px dashed #4a2a14; outline-offset: 4px; }

.home-sign-label { font-size: max(10px, 2.9cqw); font-weight: 600; opacity: .95; }
.home-sign-name {
    font-size: max(22px, 8.6cqw);
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 .5cqw 0 rgba(0, 0, 0, .18);
}

@media (prefers-reduced-motion: reduce) {
    .hs-card { animation: none; }
    .home-sign { transition: none; }
}
@media (max-width: 640px) {
    .hs-card { width: 40px; height: 56px; font-size: 18px; border-width: 2px; opacity: .55; }
}

.home-admin {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    color: #8a5a3a;
    font: 700 13px 'Nunito', sans-serif;
    opacity: .7;
    text-decoration: none;
}
.home-admin:hover { opacity: 1; text-decoration: underline; }

/* Chambres créées par l'admin : pancartes sous la scène */
.home-extra {
    position: relative;
    z-index: 2;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
    max-width: 880px;
    margin-top: 22px;
}
.home-extra[hidden] { display: none; }
.home-room-chip {
    --c1: #ffb347; --c2: #ff6b4a; --cs: #d9482f;
    padding: 10px 22px;
    border: 3px solid #fff;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--c1), var(--c2));
    box-shadow: 0 5px 0 var(--cs), 0 10px 18px rgba(0, 0, 0, .14);
    color: #fff;
    font: 700 18px 'Fredoka', sans-serif;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
    cursor: pointer;
    transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), filter .2s;
}
.home-room-chip[data-theme="mint"]   { --c1: #3ee0b0; --c2: #12a58b; --cs: #0b7d6a; }
.home-room-chip[data-theme="retro"]  { --c1: #a855f7; --c2: #ec4899; --cs: #7e22ce; }
.home-room-chip[data-theme="solar"]  { --c1: #a3e635; --c2: #22c55e; --cs: #15803d; }
.home-room-chip[data-theme="neon"]   { --c1: #00f0ff; --c2: #ff00aa; --cs: #7a0a6b; }
.home-room-chip[data-theme="liquid"] { --c1: #f59e0b; --c2: #8b5cf6; --cs: #6d28d9; }
.home-room-chip:hover, .home-room-chip:focus-visible { transform: translateY(-4px) scale(1.04); filter: brightness(1.06); }
.home-room-chip:active { transform: translateY(2px) scale(.98); }
.home-room-chip:focus-visible { outline: 3px dashed #4a2a14; outline-offset: 4px; }
