/* ==================== Chasse aux fantômes — reprend la charte de la page Fête de l'Automne ==================== */

/*
    Ces pages n'appellent pas get_header() (page "application" autonome,
    sans menu ni footer du thème) — si le thème charge ses polices
    directement dans header.php plutôt que via le système d'enqueue
    WordPress, elles ne seraient jamais chargées ici. Les deux polices
    sont donc chargées explicitement en <link> séparés par le plugin
    (voir fda_chasse_enqueue_assets), pour ne jamais dépendre de ça — un
    @import ici serait par ailleurs risqué : certains plugins de cache
    suppriment les @import des CSS lors de la minification.
*/

/*
    Même répartition typographique que la page Fête de l'Automne :
    Montserrat pour le texte courant, Amarante pour les titres et les
    boutons. La règle générale (Montserrat partout) sert de filet de
    sécurité contre les styles du thème ; les règles Amarante qui suivent
    ciblent spécifiquement titres/boutons avec une spécificité plus forte
    (".fda-chasse-page X" plutôt que juste "X") pour être sûres de
    l'emporter sur la règle générale ci-dessus.
*/
.fda-chasse-page,
.fda-chasse-page * {
    font-family: 'Montserrat', sans-serif !important;
}

.fda-chasse-page .fda-chasse-title,
.fda-chasse-page .title-fda,
.fda-chasse-page #fda-cta-fantotheque,
.fda-chasse-page #fda-cta-scan,
.fda-chasse-page #fda-claim-submit,
.fda-chasse-page #fda-bonbon-submit,
.fda-chasse-page #fda-courge-submit,
.fda-chasse-page #fda-profile-light-submit,
.fda-chasse-page .fda-btn-scan {
    font-family: 'Amarante', serif !important;
}


/* On force le fond sur html/body : la page étant une "appli" autonome
   (sans header/footer du thème), c'est le fond du thème qui apparaissait
   derrière notre contenu si celui-ci était plus court que l'écran. */
html.fda-app-html,
body.fda-app-body {
    background-color: #0D1A26 !important;
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
}

.fda-chasse-page {
    background-color: #0D1A26;
    color: #fff;
    font-family: 'Montserrat', sans-serif !important;
    padding-bottom: 60px;
    min-height: 100vh;
}

.fda-back-link {
    display: block;
    padding: 18px 20px 0;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.85em;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
}

.fda-back-link:hover {
    color: #fff;
    text-decoration: underline;
}

.fda-event-logo-link {
    display: block;
    text-decoration: none;
}

.fda-event-logo {
    display: block;
    max-width: 160px;
    width: 55%;
    height: auto;
    margin: 10px auto 5px;
    transition: opacity 0.2s ease;
}

.fda-event-logo-link:hover .fda-event-logo {
    opacity: 0.85;
}

.fda-chasse-title {
    font-family: 'Amarante', serif !important;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    font-size: xx-large;
    color: #fff;
    padding-top: 35px;
    margin-bottom: 10px;
}

.fda-chasse-title-image {
    padding-top: 15px;
}
.fda-chasse-title-image img {
    max-width: 220px;
    width: 55%;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 0 24px rgba(255, 140, 26, 0.4));
}

.fda-chasse-subtitle {
    font-family: 'Amarante', serif !important;
    text-transform: uppercase;
    text-align: center;
    font-size: 1.5em;
    color: #fff;
    margin: 16px 0 6px;
}

.fda-chasse-small-text {
    font-family: 'Montserrat', sans-serif !important;
    text-align: center;
    font-size: 0.9em;
    opacity: 0.85;
    max-width: 420px;
    margin: 0 auto 10px;
}

.fda-chasse-intro {
    font-family: 'Montserrat', sans-serif !important;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 10px;
    color: #fff;
    opacity: 0.9;
    text-shadow: 0px 0px 30px rgb(75 46 255 / 72%);
}

/* ---------- Page capture : visuel du haut ---------- */

.fda-chasse-hero-inner {
    text-align: center;
    padding: 10px 20px 30px;
}

.fda-chasse-visual {
    max-width: 320px;
    width: 80%;
    height: auto;
    margin: 15px auto 20px;
    filter: drop-shadow(0px -1px 20px rgb(75 46 255 / 55%));
}

/* ---------- Popups (scanner + résultat), au-dessus de tout le contenu ---------- */

.fda-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 14, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

.fda-modal-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    background-color: rgba(20,25,38,0.97);
    padding: 35px 25px 25px;
    outline: solid #ffffff63 4px;
    outline-offset: -4px;
    box-shadow: 0px 0px 40px -5px rgb(75 0 255 / 86%);
    border-radius: 10px;
    text-align: center;
}

.fda-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 1em;
    line-height: 1;
    cursor: pointer;
}

.fda-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.fda-scanner-video {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #000;
}

.fda-btn-scan {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 999px;
    font-family: 'Amarante', serif !important;
    text-transform: uppercase;
    font-size: 1em;
    font-weight: 700;
    color: #fff;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.6);
    cursor: pointer;
    margin-bottom: 18px;
}

.fda-btn-scan:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.fda-scanner-hint {
    margin: 0;
    font-size: 0.85em;
    opacity: 0.85;
}

/* ---------- Carte de résultat du scan ---------- */

.fda-chasse-scan-section {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.fda-capture-card {
    /* Le fond, le contour et l'ombre sont déjà portés par .fda-modal-box parent */
}

.fda-capture-loading {
    opacity: 0.75;
    margin: 0;
}

.fda-capture-pictogram {
    display: block;
    font-size: 4.5em;
    line-height: 1;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 16px rgba(120, 170, 255, 0.85)) drop-shadow(0 0 32px rgba(120, 170, 255, 0.5));
}

.fda-capture-status {
    color: #ff9d2e;
    font-weight: 700;
    margin-bottom: 6px;
}

.fda-capture-count {
    opacity: 0.75;
    font-size: 0.9em;
    margin: 0;
}

/* ---------- Boutons "citrouille" (identiques à la page événement) ---------- */

#fda-cta-fantotheque,
#fda-cta-scan,
#fda-claim-submit,
#fda-bonbon-submit,
#fda-courge-submit,
#fda-profile-light-submit {
    position: relative;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(0,0,0,0.05) 0px,
            rgba(0,0,0,0.05) 1px,
            transparent 1px,
            transparent 22px
        ),
        radial-gradient(120% 160% at 30% 0%, #ffcf70 0%, #ff9d2e 30%, #f2760f 60%, #c94e05 100%);
    border-radius: 999px;
    outline: solid 3px #ffffff4f;
    outline-offset: -3px;
    box-shadow:
        0px 0px 26px -3px rgb(255 120 0 / 65%),
        inset 0px -6px 10px rgb(0 0 0 / 25%),
        inset 0px 3px 6px rgb(255 255 255 / 35%);
    font-family: 'Amarante', serif !important;
    text-transform: uppercase;
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

#fda-cta-fantotheque,
#fda-cta-scan {
    display: block;
    width: fit-content;
    margin: 0 auto 30px;
    padding: 18px 42px;
    font-size: 1.1em;
    font-weight: 700;
}

#fda-claim-submit,
#fda-bonbon-submit,
#fda-courge-submit,
#fda-profile-light-submit {
    display: block;
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05em;
    font-weight: 700;
    margin-top: 10px;
}

#fda-cta-fantotheque:hover,
#fda-cta-scan:hover,
#fda-claim-submit:hover,
#fda-bonbon-submit:hover,
#fda-courge-submit:hover,
#fda-profile-light-submit:hover {
    text-decoration: none;
    filter: brightness(1.15);
    box-shadow:
        0px 0px 30px -1px rgb(255 120 0 / 80%),
        inset 0px -6px 10px rgb(0 0 0 / 25%),
        inset 0px 3px 6px rgb(255 255 255 / 35%);
    animation: fda-btn-wiggle 2.6s ease-in-out infinite;
}

#fda-claim-submit:disabled,
#fda-bonbon-submit:disabled,
#fda-courge-submit:disabled,
#fda-profile-light-submit:disabled {
    opacity: 0.6;
    cursor: default;
    animation: none !important;
}

@keyframes fda-btn-wiggle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(-0.6deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-2px) rotate(0.6deg); }
}

@media (prefers-reduced-motion: reduce) {
    #fda-cta-fantotheque:hover,
    #fda-claim-submit:hover {
        animation: none !important;
    }
}

/* ---------- Fantôthèque : progression ---------- */

.fda-fantotheque-section {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 20px 0;
}

.fda-fanto-progress {
    margin-bottom: 25px;
    text-align: center;
}

.fda-fanto-concours-notice {
    text-align: center;
    font-size: 0.85em;
    opacity: 0.85;
    max-width: 420px;
    margin: 0 auto 22px;
    padding: 10px 16px;
    background: rgba(255,140,26,0.08);
    border: 1px solid rgba(255,140,26,0.3);
    border-radius: 8px;
}

.fda-fanto-progress-bar {
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.fda-fanto-progress-fill {
    background: linear-gradient(90deg, #ffcf70, #f2760f);
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
}

#fda-fanto-progress-text {
    margin: 0;
    opacity: 0.85;
}

/* ---------- Fantôthèque : grille ---------- */

.fda-fanto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px;
    margin-bottom: 35px;
}

.fda-fanto-cell {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fda-fanto-cell.is-captured {
    border-color: rgba(255,140,26,0.6);
    box-shadow: 0px 0px 14px -4px rgb(255 120 0 / 60%);
}

.fda-fanto-cell-pictogram {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4em;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(120, 170, 255, 0.9)) drop-shadow(0 0 20px rgba(120, 170, 255, 0.55));
}

.fda-fanto-cell-mystery {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fda-fanto-cell-pictogram-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4em;
    line-height: 1;
    opacity: 0.18;
    filter: grayscale(1) blur(0.5px);
}

.fda-fanto-cell-question {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Amarante', serif !important;
    font-size: 2.6em;
    line-height: 1;
    color: #fff;
    text-shadow:
        0 0 12px rgba(255, 214, 64, 0.95),
        0 0 26px rgba(255, 214, 64, 0.75),
        0 0 44px rgba(255, 190, 30, 0.55);
}

.fda-fanto-cell-name {
    font-size: 0.8em;
    opacity: 0.85;
    text-align: center;
}

.fda-fanto-cell.is-locked .fda-fanto-cell-name {
    opacity: 0.45;
}

/* ---------- Fantôthèque : bloc de réclamation ---------- */

.fda-fanto-claim {
    background-color: rgba(20,25,38,0.9);
    padding: 30px 25px;
    outline: solid #ffffff63 4px;
    outline-offset: -4px;
    box-shadow: 0px 0px 26px -3px rgb(75 0 255 / 86%);
    border-radius: 10px;
    margin-bottom: 40px;
    text-align: left;
}

.fda-fanto-claim-locked p,
.fda-fanto-claim-done p {
    text-align: center;
    opacity: 0.9;
    margin: 0;
}

.fda-fanto-claim-intro {
    text-align: center;
    opacity: 0.85;
    margin-bottom: 22px;
}

.fda-form-row {
    margin-bottom: 14px;
}

.fda-form-row label {
    display: block;
    font-size: 0.85em;
    margin-bottom: 5px;
    color: #fff !important;
    opacity: 0.9;
}

.fda-form-row input[type="text"],
.fda-form-row input[type="email"],
.fda-form-row input[type="tel"],
.fda-form-row input[type="date"],
.fda-form-row input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    font-family: inherit !important;
    box-sizing: border-box;
    color-scheme: dark;
}

.fda-form-row input[type="text"]::placeholder,
.fda-form-row input[type="email"]::placeholder,
.fda-form-row input[type="tel"]::placeholder,
.fda-form-row input[type="number"]::placeholder {
    color: rgba(255,255,255,0.5) !important;
}

/* Chrome/Safari colorent le fond en jaune/blanc à l'autofill, avec un
   texte sombre imposé : on force nos couleurs par-dessus. */
.fda-form-row input:-webkit-autofill,
.fda-form-row input:-webkit-autofill:hover,
.fda-form-row input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(30,35,50,0.95) inset !important;
    caret-color: #fff;
}

.fda-form-row-split {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.fda-form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.fda-form-rgpd label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82em;
    line-height: 1.4;
    color: #fff !important;
    opacity: 0.9;
}

.fda-form-rgpd input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.fda-form-feedback {
    margin-top: 12px;
    font-size: 0.85em;
    color: #ff9d2e;
    text-align: center;
}

@media (max-width: 480px) {
    .fda-form-row-split {
        grid-template-columns: 1fr;
    }
}

/* ==================== Chasse aux bonbons ==================== */

.fda-bonbon-section {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.fda-bonbon-loading {
    text-align: center;
    opacity: 0.75;
}

.fda-bonbon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.fda-bonbon-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 14px 8px;
    cursor: pointer;
    font-family: inherit !important;
    color: #fff;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.fda-bonbon-cell:hover {
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

.fda-bonbon-cell.is-selected {
    border-color: #ff8c1a;
    background: rgba(255,140,26,0.12);
    box-shadow: 0px 0px 16px -4px rgb(255 120 0 / 70%);
}

.fda-bonbon-cell img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.fda-bonbon-cell-placeholder {
    font-size: 2em;
    line-height: 1;
}

.fda-bonbon-cell-name {
    font-size: 0.82em;
    text-align: center;
    opacity: 0.9;
}

.fda-bonbon-form-wrap {
    background-color: rgba(20,25,38,0.9);
    padding: 25px 22px;
    outline: solid #ffffff63 4px;
    outline-offset: -4px;
    box-shadow: 0px 0px 26px -3px rgb(75 0 255 / 86%);
    border-radius: 10px;
    text-align: left;
}

.fda-bonbon-selected-label {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.fda-bonbon-selected-label strong {
    color: #ff9d2e;
}

.fda-bonbon-result {
    background-color: rgba(20,25,38,0.9);
    padding: 30px 22px;
    outline: solid #ffffff63 4px;
    outline-offset: -4px;
    box-shadow: 0px 0px 26px -3px rgb(75 0 255 / 86%);
    border-radius: 10px;
    text-align: center;
}
.fda-bonbon-result p {
    opacity: 0.9;
    margin: 0;
}
.fda-bonbon-result-win h2 {
    color: #ff9d2e;
}

/* ==================== Profil léger (partagé entre les 3 jeux) ==================== */

.fda-profile-light {
    background-color: rgba(255,140,26,0.08);
    border: 2px solid rgba(255,140,26,0.4);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 25px;
    text-align: left;
}

.fda-profile-light-text {
    margin: 0 0 16px;
    text-align: center;
}
.fda-profile-light-text strong {
    color: #ff9d2e;
}

.fda-link-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: rgba(255,255,255,0.65);
    text-decoration: underline;
    font-size: 0.82em;
    margin-top: 14px;
    cursor: pointer;
    font-family: inherit !important;
}
.fda-link-btn:hover {
    color: #fff;
}

/* ==================== Pesée de la courge géante ==================== */

.fda-courge-section {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.fda-courge-slider-wrap {
    background-color: rgba(20,25,38,0.9);
    padding: 30px 22px 25px;
    outline: solid #ffffff63 4px;
    outline-offset: -4px;
    box-shadow: 0px 0px 26px -3px rgb(75 0 255 / 86%);
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.fda-courge-visual-frame {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 220px;
    margin-bottom: 10px;
    overflow: visible;
}

.fda-courge-visual-img {
    max-width: 200px;
    width: 55%;
    height: auto;
    transform: scale(0.5);
    transform-origin: center bottom;
    transition: transform 0.12s ease-out;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.5));
}

.fda-courge-counter-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 6px;
}

.fda-courge-counter {
    font-family: 'Amarante', serif !important;
    font-size: 2.4em;
    color: #ff9d2e;
    text-shadow: 0px 0px 20px rgb(255 140 26 / 55%);
}

.fda-courge-step-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,140,26,0.5);
    color: #ff9d2e;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
}
.fda-courge-step-btn:hover {
    background: rgba(255,140,26,0.15);
}
.fda-courge-step-btn:active {
    transform: scale(0.92);
}

.fda-courge-hint {
    font-size: 0.75em;
    opacity: 0.7;
    text-align: center;
    margin: 10px 0 0;
}

.fda-courge-range {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4b2eff 0%, #ff8c1a var(--fda-courge-pct, 0%), rgba(255,255,255,0.15) var(--fda-courge-pct, 0%));
    outline: none;
    cursor: pointer;
    margin: 10px 0;
}
.fda-courge-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffcf70, #f2760f);
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(255,140,26,0.7);
    cursor: pointer;
}
.fda-courge-range::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffcf70, #f2760f);
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(255,140,26,0.7);
    cursor: pointer;
}
.fda-courge-range::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: transparent;
}

.fda-courge-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    opacity: 0.6;
}

#fda-courge-form {
    background-color: rgba(20,25,38,0.9);
    padding: 25px 22px;
    outline: solid #ffffff63 4px;
    outline-offset: -4px;
    box-shadow: 0px 0px 26px -3px rgb(75 0 255 / 86%);
    border-radius: 10px;
    text-align: left;
}

.fda-courge-result,
.fda-courge-already {
    background-color: rgba(20,25,38,0.9);
    padding: 30px 22px;
    outline: solid #ffffff63 4px;
    outline-offset: -4px;
    box-shadow: 0px 0px 26px -3px rgb(75 0 255 / 86%);
    border-radius: 10px;
    text-align: center;
}
.fda-courge-result h2 {
    color: #ff9d2e;
}
.fda-courge-result p,
.fda-courge-already p {
    opacity: 0.9;
    margin: 0;
}

/* .title-fda est utilisé pour les titres de résultat (formulaires de
   jeu) — cette classe existait déjà sur la page principale mais n'avait
   jamais été définie ici : ces titres s'affichaient donc avec la police
   par défaut du navigateur (aucun style), d'où l'incohérence typo. */
.title-fda {
    font-family: 'Amarante', serif !important;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
}
