/* ============================================================
   Maison Beaussier - Pages publiques du jeu
   ============================================================ */

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- En-tete ------------------------------------------------------ */
.site-header {
    background: var(--mb-paper);
    border-bottom: 1px solid var(--mb-stone);
    padding: var(--space-4) 0;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header--split .site-header__inner {
    justify-content: space-between;
    gap: var(--space-4);
}

.site-main {
    flex: 1;
    padding: var(--space-6) 0 var(--space-8);
}

/* --- Pied de page ------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--mb-stone);
    background: var(--mb-paper);
    padding: var(--space-5) 0;
    font-size: 0.85rem;
    color: var(--mb-muted);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-3);
}

.site-footer a {
    color: var(--mb-muted);
    text-decoration: none;
}

.site-footer a:hover { color: var(--mb-red); text-decoration: underline; }

.site-footer__sep { color: var(--mb-stone-dark); }

/* --- Bloc d'accueil ----------------------------------------------- */
.hero {
    text-align: center;
    padding: var(--space-5) 0 var(--space-6);
}

.hero__eyebrow {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mb-muted);
    margin-bottom: var(--space-4);
}

.hero__title { margin-bottom: var(--space-3); }

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--mb-muted);
    max-width: 36rem;
    margin: 0 auto var(--space-5);
    line-height: 1.6;
}

.hero__rule {
    width: 3.5rem;
    height: 2px;
    background: var(--mb-red);
    margin: 0 auto var(--space-5);
    border: 0;
}

/* --- Choix de boutique -------------------------------------------- */
.store-list {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

@media (min-width: 46rem) {
    .store-list { grid-template-columns: 1fr 1fr; }
}

.store-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-5);
    background: var(--mb-paper);
    border: 1px solid var(--mb-stone);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    position: relative;
}

.store-card:hover {
    border-color: var(--mb-red);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    color: inherit;
}

.store-card__label {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mb-red);
    font-weight: 600;
}

.store-card__name {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--mb-ink);
    line-height: 1.25;
}

.store-card__meta { font-size: 0.92rem; color: var(--mb-muted); }

.store-card__go {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mb-red);
}

/* --- Etapes ------------------------------------------------------- */
.steps {
    list-style: none;
    counter-reset: step;
    margin: var(--space-6) 0 0;
    padding: 0;
    display: grid;
    gap: var(--space-4);
    text-align: left;
}

@media (min-width: 52rem) {
    .steps { grid-template-columns: repeat(4, 1fr); }
}

.steps li {
    counter-increment: step;
    position: relative;
    padding: var(--space-4) var(--space-4) var(--space-4) 3.5rem;
    background: var(--mb-paper);
    border: 1px solid var(--mb-stone);
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.5;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: var(--space-4);
    top: var(--space-4);
    width: 1.9rem;
    height: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--mb-red);
    border: 1px solid var(--mb-red);
    border-radius: 50%;
}

/* --- Bloc parcours ------------------------------------------------ */
.panel {
    background: var(--mb-paper);
    border: 1px solid var(--mb-stone);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
}

@media (min-width: 40rem) {
    .panel { padding: var(--space-6); }
}

.panel + .panel { margin-top: var(--space-4); }

.panel__step {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mb-muted);
    margin-bottom: var(--space-3);
}

.panel__step-number {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--mb-ink);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 0.8rem;
}

.panel.is-done .panel__step-number { background: var(--mb-ok); }
.panel.is-locked { opacity: 0.55; }

.store-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4);
    background: var(--mb-paper);
    border: 1px solid var(--mb-stone);
    border-left: 3px solid var(--mb-red);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
    font-size: 0.95rem;
}

.store-banner strong { font-family: var(--font-serif); font-size: 1.05rem; }
.store-banner a { font-size: 0.85rem; }

/* --- Connexion Google --------------------------------------------- */
.google-slot {
    display: flex;
    justify-content: center;
    min-height: 44px;
    margin: var(--space-4) 0 var(--space-2);
}

.identity {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--mb-cream);
    border: 1px solid var(--mb-stone);
    border-radius: var(--radius);
}

.identity__name { font-weight: 600; }
.identity__mail { font-size: 0.85rem; color: var(--mb-muted); }

/* --- Roulette ----------------------------------------------------- */
.wheel-stage {
    position: relative;
    width: min(88vw, 26rem);
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

.wheel-stage__frame {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 10px solid var(--mb-paper);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--mb-stone-dark);
    overflow: hidden;
    background: var(--mb-cream);
}

.wheel {
    width: 100%;
    height: 100%;
    display: block;
    transform: rotate(0deg);
    transition: transform 5.2s cubic-bezier(0.16, 0.84, 0.28, 1);
    will-change: transform;
}

.wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22%;
    height: 22%;
    transform: translate(-50%, -50%);
    background: var(--mb-paper);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(26, 22, 20, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border: 1px solid var(--mb-stone);
}

.wheel-hub span {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 4.5vw, 1.5rem);
    color: var(--mb-red);
    line-height: 1;
}

.wheel-pointer {
    position: absolute;
    top: -0.35rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 0.85rem solid transparent;
    border-right: 0.85rem solid transparent;
    border-top: 1.4rem solid var(--mb-red);
    filter: drop-shadow(0 2px 3px rgba(26, 22, 20, 0.3));
    z-index: 3;
}

.wheel-actions {
    margin-top: var(--space-6);
    text-align: center;
}

/* --- Resultat ----------------------------------------------------- */
.result {
    text-align: center;
    animation: result-in 0.5s ease both;
}

@keyframes result-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.result__eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mb-muted);
}

.result__gift {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    color: var(--mb-red);
    margin: var(--space-2) 0 var(--space-3);
}

.result__image {
    width: 8rem;
    height: 8rem;
    object-fit: contain;
    margin: 0 auto var(--space-4);
}

.code-box {
    display: inline-block;
    padding: var(--space-4) var(--space-5);
    border: 1px dashed var(--mb-red);
    border-radius: var(--radius);
    background: var(--mb-red-wash);
    margin: var(--space-4) 0;
}

.code-box__label {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mb-muted);
    margin-bottom: var(--space-2);
}

.code-box__value {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: clamp(1.35rem, 5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--mb-ink);
}

.status-line {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius);
    border: 1px solid var(--mb-stone);
    background: var(--mb-cream);
    font-size: 0.95rem;
    line-height: 1.55;
}

.status-line--ok { border-color: rgba(47, 107, 71, 0.35); background: var(--mb-ok-wash); color: #1f4d33; }
.status-line--wait { border-color: rgba(154, 100, 20, 0.35); background: var(--mb-warn-wash); color: #6f480f; }
.status-line--error { border-color: rgba(163, 24, 43, 0.35); background: var(--mb-danger-wash); color: #7e1322; }

.spinner {
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Pages legales ------------------------------------------------ */
.legal {
    background: var(--mb-paper);
    border: 1px solid var(--mb-stone);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

@media (min-width: 40rem) { .legal { padding: var(--space-7); } }

.legal h2 {
    font-size: 1.3rem;
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--mb-stone);
}

.legal h2:first-of-type { margin-top: var(--space-4); border-top: 0; padding-top: 0; }
.legal h3 { font-size: 1.05rem; margin-top: var(--space-5); }
.legal ul, .legal ol { padding-left: 1.25rem; margin-bottom: var(--space-4); }
.legal li { margin-bottom: var(--space-2); }
.legal dl { margin: 0 0 var(--space-4); }
.legal dt { font-weight: 600; margin-top: var(--space-3); }
.legal dd { margin: 0 0 var(--space-2); color: var(--mb-muted); }

.to-fill {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    border: 1px dashed var(--mb-stone-dark);
    border-radius: var(--radius-sm);
    color: var(--mb-faint);
    font-size: 0.9em;
}

/* --- Connexion professionnelle ------------------------------------ */
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-6) var(--space-4);
    background:
        radial-gradient(circle at 50% 0%, rgba(190, 28, 45, 0.05), transparent 55%),
        var(--mb-cream);
}

.auth-card {
    width: 100%;
    max-width: 25rem;
    margin: 0 auto;
    background: var(--mb-paper);
    border: 1px solid var(--mb-stone);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--space-6) var(--space-5);
    text-align: center;
}

.auth-card h1 {
    font-size: 1.35rem;
    margin: var(--space-5) 0 var(--space-2);
}

.auth-card .field { text-align: left; margin-top: var(--space-5); }

.auth-footer {
    text-align: center;
    margin-top: var(--space-5);
    font-size: 0.85rem;
    color: var(--mb-muted);
}

.auth-footer a { color: var(--mb-muted); }

/* --- Interface employe -------------------------------------------- */
.employee-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--mb-cream); }

.employee-header {
    background: var(--mb-paper);
    border-bottom: 1px solid var(--mb-stone);
    padding: var(--space-3) 0;
}

.employee-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.employee-main { flex: 1; padding: var(--space-5) 0 var(--space-7); }

.code-input {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
    min-height: 4rem;
    font-weight: 600;
}

.verdict {
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    border: 2px solid var(--mb-stone);
    background: var(--mb-paper);
}

.verdict--ok { border-color: var(--mb-ok); background: var(--mb-ok-wash); }
.verdict--error { border-color: var(--mb-danger); background: var(--mb-danger-wash); }
.verdict--warn { border-color: var(--mb-warn); background: var(--mb-warn-wash); }

.verdict__title {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 5vw, 1.75rem);
    margin: var(--space-3) 0;
}

.verdict__grid {
    display: grid;
    gap: var(--space-3);
    text-align: left;
    margin: var(--space-5) 0;
    background: var(--mb-paper);
    border: 1px solid var(--mb-stone);
    border-radius: var(--radius);
    padding: var(--space-4);
}

.verdict__grid dt {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mb-muted);
    font-weight: 700;
}

.verdict__grid dd {
    margin: 0.15rem 0 0;
    font-size: 1.05rem;
    color: var(--mb-ink);
    font-weight: 600;
}

.verdict__grid dd.big { font-family: var(--font-serif); font-size: 1.35rem; }
