/* Neuropépites
   Variables communes : style.css. Conserver l’ordre des surcharges et des media queries. */

#np-counter {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #d5ad59;
    background: #132e49;
    color: var(--yc-couleur-or-clair);
    border-radius: var(--yc-arrondi-12);
    padding: 4px 8px;
    white-space: nowrap;
    font-weight: 700;
    flex-shrink: 0;
}

#np-counter img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.np-label {
    font-size: var(--yc-texte-11);
}

.np-egg {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 5px;
    border: 0;
    background: transparent;
    cursor: pointer;
    vertical-align: middle;
    z-index: 4;
}

.np-egg[hidden] {
    display: none;
}

.np-egg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: .78;
    animation: np-glint 8s ease-in-out infinite;
}

.np-egg:hover img,.np-egg:focus-visible img {
    opacity: 1;
    filter: drop-shadow(0 0 7px #ffd65a);
}

@keyframes np-glint {
    0%,85%,100% {
        filter: none;
    }

    90% {
        filter: drop-shadow(0 0 5px #ffd65a);
    }

}

.np-hero-one,.np-hero-two {
    position: absolute;
}

.np-hero-one {
    left: 66%;
    top: 78%;
}

.np-hero-two {
    right: 7%;
    top: 28%;
}

#approche,#contact,#portfolio .intro,.gallery-head {
    position: relative;
}

#approche>.np-egg,#contact>.np-egg,#portfolio .intro>.np-egg {
    position: absolute;
    right: 5%;
    bottom: 4px;
}

.np-offer {
    display: grid;
    margin-left: auto;
}

.np-fly {
    position: fixed;
    width: 44px;
    height: 44px;
    object-fit: contain;
    z-index: 1000;
    pointer-events: none;
}

#np-dialog {
    width: min(480px,92vw);
    max-height: 85dvh;
    overflow: auto;
    box-sizing: border-box;
    border: 1px solid #d5ad59;
    background: linear-gradient(145deg,#173e5c,#0b213e);
    padding: 24px;
    color: var(--yc-couleur-blanc);
}

#np-dialog h2 {
    margin: 8px 0;
    color: var(--yc-couleur-or-clair);
}

#np-dialog h3 {
    font-size: 1rem;
    color: var(--yc-couleur-or-clair);
    margin: 16px 0 4px;
}

#np-dialog p {
    margin: 6px 0;
    line-height: 1.5;
}

#np-dialog a {
    color: var(--yc-couleur-or-clair);
    text-decoration: underline;
}

#np-close {
    float: right;
    background: none;
    color: white;
    border: 0;
    font-size: var(--yc-texte-28);
    cursor: pointer;
}

.np-prize {
    display: block;
    width: 100px;
    height: 80px;
    object-fit: contain;
    margin: auto;
}

.np-sub {
    color: #a7e4f5;
}

.np-tip {
    background: #102e48;
    border-radius: var(--yc-arrondi-12);
    padding: 8px 12px;
    margin: 12px 0;
}

.np-tip h3 {
    color: #dfff40 !important;
    margin-top: 0 !important;
}

.np-continue {
    background: var(--yc-couleur-or-clair);
    color: #10243b;
    border: 0;
    border-radius: var(--yc-arrondi-12);
    padding: 12px;
    margin-top: 12px;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
}

.np-progress {
    height: 8px;
    background: #081c30;
    border-radius: var(--yc-arrondi-8);
    overflow: hidden;
}

.np-progress span {
    display: block;
    height: 100%;
    background: var(--yc-couleur-or-clair);
}

.np-egg:focus-visible,#np-counter:focus-visible,#np-dialog button:focus-visible {
    outline: 2px solid var(--yc-couleur-or-clair);
    outline-offset: 3px;
}

@media(max-width:1250px) {
    .np-label {
        display: none;
    }

    header {
        gap: var(--yc-espace-12);
    }

}

@media(max-width:767px) {
    #np-counter {
        margin-left: auto;
    }

    #menu {
        margin-left: 0 !important;
    }

    .np-hero-one {
        left: 17%;
        top: 65%;
    }

    .np-hero-two {
        right: 12%;
        top: 38%;
    }

    #np-counter img {
        width: 26px;
        height: 26px;
    }

}

@media(prefers-reduced-motion:reduce) {
    .np-egg img {
        animation: none;
    }

}

#np-dialog:has(.np-list) {
    width: min(650px,94vw);
}

.np-list {
    display: grid;
    gap: var(--yc-espace-8);
    margin: 16px 0;
}

.np-list details,.np-locked {
    background: #102b43;
    border: 1px solid #5f5c46;
    border-radius: var(--yc-arrondi-12);
    padding: 12px;
}

.np-list summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--yc-espace-10);
    line-height: 1.5;
}

.np-list summary img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.np-list strong {
    color: var(--yc-couleur-or-clair);
}

.np-locked {
    color: #a7bacb;
    border-color: #31465b;
}

.np-celebration {
    display: block;
    width: min(260px,100%);
    margin: auto;
}

.np-download {
    display: block;
    text-align: center;
    padding: 12px;
}

.np-secondary,.np-answer {
    background: #173e5c;
    color: var(--yc-couleur-or-clair);
    border: 1px solid #bca05e;
}

.np-answer {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: var(--yc-arrondi-10);
    cursor: pointer;
}

.np-answer:disabled {
    opacity: .7;
}

.np-continue[hidden] {
    display: none;
}

/* V13.1 : pépites sans chrome de bouton dans les solutions */
#detail.offer #content {
    position: relative;
}

#detail.offer button.np-offer {
    position: absolute;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 5px;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    appearance: none;
}

#detail.offer button.np-offer[hidden] {
    display: none;
}

#detail.offer .np-offer img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#detail.offer .np-offer[data-np="2"] {
    top: 12px;
    right: 13%;
}

#detail.offer .np-offer[data-np="3"] {
    top: 70px;
    right: 9%;
}

#detail.offer .np-offer[data-np="7"] {
    top: 5px;
    left: 16%;
}

@media(max-width:767px) {
    #detail.offer .np-offer[data-np="2"] {
        top: 0;
        right: 0;
    }

    #detail.offer .np-offer[data-np="3"] {
        top: 48px;
        right: 0;
    }

    #detail.offer .np-offer[data-np="7"] {
        top: 0;
        left: 0;
    }

}

/* Bee’Good : une pépite discrète dans le contenu du projet. */
#portfolio-detail button.np-beegood {
    display: grid;
    place-items: center;
    order: 1;
    flex-shrink: 0;
    margin: 0 0 0 auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 5px;
    width: 44px;
    height: 44px;
}

#portfolio-detail #portfolio-close {
    order: 2;
    flex-shrink: 0;
}

#portfolio-detail button.np-beegood[hidden] {
    display: none;
}

#portfolio-detail button.np-beegood img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.np-reset {
    display: block;
    margin: 18px auto 4px;
    padding: 8px 12px;
    border: 1px solid #82a6c4;
    border-radius: var(--yc-arrondi-12);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.np-reset:hover,.np-reset:focus-visible {
    outline: 2px solid #dfff40;
    outline-offset: 3px;
}

/* V17.5 — trésor et défi */
#np-challenge {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    border: 1px solid #7691a5;
    border-radius: var(--yc-arrondi-10);
    padding: 8px;
    color: #d1e5f3;
    background: #19354c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    min-height: 44px;
}

#np-challenge svg {
    width: 23px;
    height: 23px;
}

#np-challenge svg:last-child {
    width: 15px;
    height: 15px;
    color: var(--yc-couleur-or-clair);
}

#np-challenge.unlocked {
    background: var(--yc-couleur-accent-lime);
    color: #102b3c;
    border-color: var(--yc-couleur-accent-lime);
    animation: np-unlock .8s ease-out;
}

#np-challenge.unlocked svg:last-child {
    color: #102b3c;
}

#np-challenge.done {
    color: var(--yc-couleur-or-clair);
    border-color: var(--yc-couleur-or-clair);
}

@keyframes np-unlock {
    50% {
        box-shadow: 0 0 18px var(--yc-couleur-accent-lime);
    }

}

#np-challenge:focus-visible {
    outline: 2px solid var(--yc-couleur-or-clair);
    outline-offset: 3px;
}

#np-dialog {
    border-radius: var(--yc-arrondi-20);
    max-height: 90dvh;
}

#np-dialog[data-mode=treasure] {
    width: min(1100px,94vw);
}

#np-dialog[data-mode=challenge],#np-dialog[data-mode=results] {
    width: min(920px,94vw);
}

#np-close {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #102b43;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 1;
}

#np-dialog [hidden] {
    display: none !important;
}

.np-gold {
    color: var(--yc-couleur-or-clair);
    font-weight: 700;
}

.np-list {
    grid-template-columns: repeat(2,minmax(0,1fr));
}

.np-tile {
    display: flex;
    align-items: center;
    gap: var(--yc-espace-10);
    text-align: left;
    background: #102b43;
    border: 1px solid #766748;
    border-radius: var(--yc-arrondi-12);
    padding: 12px;
    color: #e5f2fa;
    font: inherit;
    cursor: pointer;
    line-height: 1.45;
}

.np-tile img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.np-tile b {
    margin-left: auto;
    color: var(--yc-couleur-or-clair);
    font-size: 26px;
}

.np-tile:hover {
    box-shadow: 0 0 12px #ffe29a40;
}

.np-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--yc-espace-12);
    flex-wrap: wrap;
    margin: 18px 0;
}

.np-actions .np-continue,.np-actions .np-download {
    width: auto;
    margin: 0;
}

.np-continue {
    background: var(--yc-couleur-accent-lime);
    color: #10243b;
}

.np-continue.np-secondary {
    background: #173e5c;
    color: #e4f6ff;
    border: 1px solid var(--yc-couleur-cyan-doux);
}

.np-continue:disabled {
    background: #344759;
    color: #a6b6c4;
    cursor: not-allowed;
}

.np-download {
    border: 1px solid var(--yc-couleur-cyan-doux);
    border-radius: var(--yc-arrondi-12);
    background: #1c4963;
    text-decoration: none !important;
    color: var(--yc-couleur-blanc) !important;
    font-weight: 700;
}

.np-reset {
    border: 0;
    text-decoration: underline;
    color: #b9d8e9;
    font-size: .9rem;
}

.np-segments {
    display: flex;
    gap: var(--yc-espace-4);
    margin: 12px 0;
}

.np-segments span {
    height: 5px;
    flex: 1;
    background: #416079;
    border-radius: var(--yc-arrondi-4);
}

.np-segments .past {
    background: var(--yc-couleur-vert-doux);
}

.np-segments .current {
    background: var(--yc-couleur-or-clair);
}

.np-options {
    display: grid;
    gap: var(--yc-espace-10);
    margin: 16px 0;
}

.np-options.visual {
    grid-template-columns: repeat(2,minmax(0,1fr));
}

.np-option {
    display: flex;
    align-items: flex-start;
    gap: var(--yc-espace-10);
    padding: 14px;
    border: 1px solid #416079;
    border-radius: var(--yc-arrondi-12);
    background: #0c263d;
    cursor: pointer;
    line-height: 1.5;
}

.np-option>span {
    min-width: 0;
    flex: 1;
}

.np-option input {
    accent-color: #c6ed76;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.np-option:has(input:checked) {
    border-color: var(--yc-couleur-cyan-doux);
    background: #254d68;
}

.np-option.correct {
    border-color: var(--yc-couleur-vert-doux);
    background: #284b40;
}

.np-option.incorrect {
    border-color: #f0a49a;
    background: #533b39;
}

.np-support {
    display: block;
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: contain;
    background: var(--yc-couleur-blanc);
    margin-top: 8px;
    border-radius: 6px;
}

.np-zoom,.np-retry {
    background: transparent;
    color: var(--yc-couleur-or-clair);
    border: 0;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 8px 0;
}

.np-lightbox {
    width: min(1100px,96vw);
    background: #102b43;
    color: white;
    border: 1px solid var(--yc-couleur-cyan-doux);
}

.np-lightbox img {
    width: 100%;
    height: auto;
    max-height: 80dvh;
    object-fit: contain;
}

.np-lightbox button {
    display: block;
    margin-left: auto;
    background: transparent;
    color: white;
    font-size: var(--yc-texte-28);
    border: 0;
}

.np-week {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 3px;
    text-align: center;
    margin-top: 10px;
}

.np-week b {
    display: block;
    background: #19354c;
    padding: 5px 0;
    border-radius: var(--yc-arrondi-4);
}

.np-week .active {
    background: var(--yc-couleur-vert-doux);
    color: #10243b;
}

.np-neuron-text {
    background: #eaf5fa;
    color: #10243b;
    padding: 12px;
    border-radius: var(--yc-arrondi-8);
    margin-top: 8px;
}

.np-decor-brain {
    display: block;
    font-size: 60px;
    text-align: center;
}

.np-hint {
    border: 1px solid var(--yc-couleur-cyan-doux);
    border-radius: var(--yc-arrondi-10);
    padding: 10px;
    color: #e1effa;
}

.np-hint summary {
    cursor: pointer;
}

.np-feedback {
    display: flex;
    gap: var(--yc-espace-12);
    align-items: center;
    background: #1a4059;
    border-radius: var(--yc-arrondi-12);
    padding: 12px;
    margin-top: 12px;
}

.np-feedback img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.np-feedback h3 {
    margin-top: 0 !important;
}

.np-memory {
    font-size: clamp(20px,4vw,36px);
    letter-spacing: .08em;
    text-align: center;
    padding: 35px 0;
    font-weight: 700;
    color: var(--yc-couleur-or-clair);
}

#np-recall {
    width: 100%;
    padding: 12px;
    font: inherit;
    color: #10243b;
    background: white;
    border-radius: var(--yc-arrondi-8);
}

.np-summit {
    width: 100%;
    display: block;
    border-radius: var(--yc-arrondi-12);
    mask-image: linear-gradient(black 80%,transparent);
}

.np-results {
    border: 1px solid var(--yc-couleur-cyan-doux);
    border-radius: var(--yc-arrondi-12);
    padding: 8px 14px;
    margin: 16px 0;
}

.np-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--yc-espace-12);
    padding: 10px 0;
    border-bottom: 1px solid #416079;
}

.np-result:last-child {
    border: 0;
}

.np-result .success {
    color: var(--yc-couleur-vert-doux);
}

.np-result .experienced {
    color: var(--yc-couleur-cyan-doux);
}

.np-result> :last-child {
    flex-shrink: 0;
    font-size: .9rem;
}

.np-result .np-retry {
    padding: 0;
}

@media(max-width:1250px) {
    #np-challenge span {
        display: none;
    }

}

@media(max-width:767px) {
    #np-dialog {
        padding: 16px;
    }

    #np-dialog[data-mode=treasure] #np-title {
        position: sticky;
        top: 0;
        background: #12334d;
        padding: 8px 44px 8px 0;
        z-index: 1;
    }

    .np-list,.np-options.visual {
        grid-template-columns: 1fr;
    }

    .np-feedback img {
        width: 70px;
        height: 70px;
    }

    #np-challenge {
        padding: 5px;
        gap: 2px;
    }

    #np-challenge svg {
        width: 22px;
    }

    #np-counter {
        padding: 4px 5px;
    }

    header .brand .brand-wordmark {
        max-width: 24vw;
    }

    .np-actions>* {
        max-width: 100%;
    }

    .np-result {
        font-size: .9rem;
    }

}

@media(prefers-reduced-motion:reduce) {
    #np-challenge.unlocked {
        animation: none;
    }

}

/* V17.6 : neutralise la limite globale des dialogues */
#np-dialog {
    max-width: 96vw;
}

#np-dialog[data-mode=treasure] {
    width: min(1150px,94vw);
    max-width: 94vw;
}

#np-dialog[data-mode=challenge],#np-dialog[data-mode=results] {
    width: min(1050px,94vw);
    max-width: 94vw;
}

.np-options.visual:has(> :nth-child(3)):not(:has(> :nth-child(4))) {
    grid-template-columns: repeat(3,minmax(0,1fr));
}

.np-option {
    min-width: 0;
}

.np-option img {
    max-width: 100%;
    height: auto;
}

@media(max-width:700px) {
    .np-options.visual,.np-options.visual:has(> :nth-child(3)),.np-list {
        grid-template-columns: 1fr !important;
    }

}

/* Résultat lisible sans distinction des couleurs. */
.np-answer-status:not([hidden]) {
    display: block;
    margin-top: 6px;
    font-weight: 700;
}

#detail.offer .offer-dialog-footer button.np-offer {
    position: absolute !important;
    top: 50% !important;
    right: 30px !important;
    left: auto !important;
    bottom: auto !important;
    transform: translateY(-50%);
    margin: 0;
    padding: 2px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

#detail.offer .offer-dialog-footer button.np-offer img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

@media (max-width: 600px) {

    #detail.offer .offer-dialog-footer {
        padding-right: 55px;
        padding-left: 55px;
    }

    #detail.offer .offer-dialog-footer button.np-offer {
        right: 8px !important;
        width: 36px;
        height: 36px;
    }

    #detail.offer .offer-dialog-footer button.np-offer img {
        width: 32px;
        height: 32px;
    }
}
@media (min-width: 900px) {

    .hero .np-hero-one img,
    .hero .np-hero-two img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

}

@media (min-width: 480px) and (max-width: 767px) {

    .hero .np-hero-one {
        left: calc(50% - 65px) !important;
        right: auto !important;
        top: 63% !important;
    }

    .hero .np-hero-two {
        right: calc(50% - 125px) !important;
        left: auto !important;
        top: 42% !important;
    }

}
/* Navigation — halos harmonisés avec le bouton Contact. */
#np-counter,
#np-challenge {
    transition: box-shadow var(--yc-transition-rapide),
                border-color var(--yc-transition-rapide);
}

#np-counter {
    --np-hover-color: var(--yc-couleur-or-clair);
    --np-hover-halo: 0 0 14px #ffe29a44;
}

#np-challenge {
    --np-hover-color: var(--yc-couleur-cyan-doux);
    --np-hover-halo: 0 0 14px #71cce844;
}

#np-challenge.unlocked {
    --np-hover-color: var(--yc-couleur-accent-lime);
    --np-hover-halo: var(--yc-halo-lime-14);
}

#np-challenge.done {
    --np-hover-color: var(--yc-couleur-or-clair);
    --np-hover-halo: 0 0 14px #ffe29a44;
}

@media (hover: hover) {
    #np-counter:hover,
    #np-challenge:hover {
        border-color: var(--np-hover-color);
        box-shadow: var(--np-hover-halo);
    }
}

#np-counter:focus-visible,
#np-challenge:focus-visible {
    border-color: var(--np-hover-color);
    box-shadow: var(--np-hover-halo);
}

@media (prefers-reduced-motion: reduce) {
    #np-counter,
    #np-challenge {
        transition: none;
    }
}
