:root {
    --pz-red: #B4252B;
    --pz-grey: #F3F3F3;
    --pz-dark: #222;
    --radius: 10px;
    font-family: system-ui, sans-serif;
}

/* ============ INTRO, QUESTIONS, CARTES, OVERLAY ============ */
#mjc-intro, #mjc-questions, #mjc-proposition, #mjc-contact-overlay, .mjc-code-wrap {
    transition: opacity 0.25s, transform 0.25s;
    opacity: 1;
    transform: translateY(0);
}
#mjc-intro[style*="display: none"], #mjc-questions[style*="display: none"], #mjc-contact-overlay[style*="display: none"] {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* ============ INTRO ============ */
#mjc-intro {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
    color: var(--pz-dark);
}
#mjc-intro img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
#mjc-intro h2 {
    font-size: 1.6rem;
    margin: 0 0 .8rem;
}
#mjc-intro p {
    margin: .6rem 0;
    line-height: 1.45;
}
.mjc-tagline {
    font-style: italic;
    color: #555;
}
#mjc-intro details {
    margin: 1rem 0;
    text-align: left;
    border: 1px solid var(--pz-grey);
    padding: .7rem;
    border-radius: var(--radius);
    background: #fff;
}
#mjc-intro summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--pz-red);
    margin-bottom: .4rem;
}
#mjc-intro ul {
    margin-left: 1.1rem;
    padding-left: 0;
}
#mjc-intro li {
    margin: .3rem 0;
}
.mjc-note {
    font-size: .9rem;
    color: #666;
}
#mjc-start {
    margin-top: 1.3rem;
    background: var(--pz-red);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: .8rem 1.4rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
#mjc-start:hover {
    background: #e84545;
    color: #fff;
}

/* ============ QUESTIONS ============ */
#mjc-questions h3 {
    margin: 0 0 .7rem;
    font-size: 1.15rem;
    color: var(--pz-dark);
}
.mjc-options {
    display: grid;
    gap: .5rem;
}
.mjc-options label {
    background: var(--pz-grey);
    border: 1px solid #ccc;
    padding: .5rem .6rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s, color 0.2s, filter 0.25s;
}
.mjc-options input {
    margin-right: .4rem;
}
.mjc-options label:hover {
    box-shadow: 0 4px 24px rgba(180,37,43,0.08);
    background: #ffeaea;
    filter: brightness(1.06);
}
.mjc-options label:focus-within {
    outline: 2px solid #B4252B22;
    box-shadow: 0 0 0 2px #F3F3F3;
}

/* ============ BOUTONS ============ */
#mjc-next, #mjc-coupon, #mjc-tirage, .mjc-btn-primary {
    margin-top: 1rem;
    padding: .65rem 1.2rem;
    background: var(--pz-red);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
#mjc-next:hover, #mjc-coupon:hover, #mjc-tirage:hover, .mjc-btn-primary:hover {
    background: #e84545;
    color: #fff;
}
.mjc-btn-secondary {
    background: #eee;
    color: #222;
    border: 1px solid #ccc;
    padding: .7rem 1.4rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.mjc-btn-secondary:hover {
    background: #ddd;
    color: #B4252B;
}
.mjc-btn-red{
  flex:1 1 160px;              /* même largeur mini */
  background:#B4252B;
  color:#fff;
  border:none;
  padding:.9rem 1.4rem;
  border-radius:8px;
  font-weight:600;
  text-align:center;
  cursor:pointer;
}
.mjc-btn-red:hover{filter:brightness(1.08)}
.mjc-btn-wrap{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center;margin-top:.9rem}

/* ============ CARTES ============ */
#mjc-proposition {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}
.mjc-header-cards {
    text-align: center;
    margin-bottom: .8rem;
}
.mjc-explication {
    font-size: .95rem;
    color: #555;
    margin: .3rem auto;
    max-width: 620px;
}
.mjc-card {
    flex: 1 1 240px;
    border: 2px solid var(--pz-red);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    background: #fff;
    transition: box-shadow 0.25s, filter 0.25s;
}
.mjc-card h3 {
    margin: .2rem 0;
    font-size: 1.1rem;
    color: var(--pz-dark);
}
.mjc-card p {
    margin: .3rem 0 1rem;
    font-size: .95rem;
    color: #444;
}
.mjc-card button {
    background: var(--pz-red);
    color: #fff;
    border: none;
    padding: .5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.mjc-card:focus-within, .mjc-card:hover:not(.mjc-off) {
    box-shadow: 0 2px 16px rgba(180,37,43,0.13);
}
.mjc-card:active { transform: scale(0.98); }
.mjc-score {
    margin: .2rem 0;
    font-size: .95rem;
    color: #555;
}
.mjc-score strong {
    font-size: 1.15rem;
    color: var(--pz-red);
}
.mjc-autres {
    flex-basis: 100%;
    margin-top: 1rem;
    text-align: left;
    transition: max-height 0.2s;
}
.mjc-autres h4 {
    margin: .2rem 0 .4rem;
    font-size: 1rem;
    color: #444;
}
.mjc-autres ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: .9rem;
    list-style: disc;
}
.mjc-autres li span {
    font-weight: 600;
    color: var(--pz-dark);
}
.mjc-off {
    opacity: .55;
    filter: grayscale(1);
    pointer-events: none;
}
.mjc-off button {
    background: #888;
    cursor: not-allowed;
}

/* ============ OVERLAY CONTACT ============ */
#mjc-contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.25s;
}
#mjc-contact-form {
    background: #fff;
    padding: 1.4rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 320px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    position: relative;
}
#mjc-contact-form h3 {
    margin: 0 0 .9rem;
    font-size: 1.1rem;
    text-align: center;
    color: var(--pz-dark);
}
#mjc-contact-form input {
    width: 100%;
    padding: .55rem;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    background: var(--pz-grey);
    margin-bottom: .7rem;
    transition: border 0.2s, box-shadow 0.2s;
}
#mjc-contact-form button {
    width: 100%;
    background: var(--pz-red);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: .65rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.mjc-help {
    display: block;
    margin-top: .2rem;
    font-size: .85rem;
    color: #B4252B;
}

/* ---- RGPD et Checkbox custom ---- */
.mjc-rgpd {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.93rem;
    margin: 0.8rem 0 0.5rem 0;
    color: #555;
    user-select: none;
}
.mjc-rgpd input[type="checkbox"] { 
    accent-color: var(--pz-red);
    margin-top: 0.22em;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}
input[type="checkbox"]:focus-visible {
    outline: 2px solid #B4252B22;
    box-shadow: 0 0 0 2px #F3F3F3;
}

/* Styles pour le loader global */
#mjc-global-loader {
    z-index: 100000 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: none; /* Caché par défaut */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#mjc-global-loader::after {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 6px solid #B4252B;
    border-color: #B4252B transparent #B4252B transparent;
    animation: mjc-spin 1.2s linear infinite;
}

@keyframes mjc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============ DILEMME & CODE ============ */
.mjc-code-wrap {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.25s;
}
.mjc-code-box {
    background: #fff;
    padding: 1.6rem 2rem;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 340px;
    box-shadow: 0 6px 22px rgba(0,0,0,.3);
}
.mjc-bigcode {
    font-size: 1.5rem;
    font-weight: 700;
    margin: .6rem 0;
    color: #B4252B;
}
.mjc-count {
    margin: .4rem 0 .8rem;
    color: #444;
}
.mjc-btn-wrap {
    display: flex;
    gap: .8rem;
    justify-content: center;
    margin-top: .8rem;
}
.mjc-choice-wrap {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.mjc-btn-primary {
    background: #B4252B;
    color: #fff;
    border: none;
    padding: .7rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mjc-btn-primary[disabled],
.mjc-btn-secondary[disabled],
.mjc-btn-disabled {
    background: #e2e2e2 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 0.7 !important;
    pointer-events: none;
    transition: background 0.2s;
}

.mjc-btn-primary:hover { background: #e84545; color: #fff; }
.mjc-btn-secondary { background: #eee; color: #222; }

input:focus, button:focus, .mjc-options label:focus-within {
    outline: 2px solid #B4252B !important;
    box-shadow: 0 0 0 2px #F3F3F3;
    z-index: 2;
}

/* Responsive min */
@media (max-width: 600px) {
    #mjc-contact-form, .mjc-code-box { padding: .8rem; }
    .mjc-explication { font-size: .9rem; }
    .mjc-card { min-width: 170px; }
}

input[type="checkbox"] {
    accent-color: var(--pz-red);
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}
input[type="checkbox"]:focus-visible {
    outline: 2px solid #B4252B22 !important;
    box-shadow: 0 0 0 2px #F3F3F3 !important;
}

/* Cases radio aussi sans entourage moche */
input[type="radio"] {
    accent-color: var(--pz-red);
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}
input[type="radio"]:focus-visible {
    outline: 2px solid #B4252B22 !important;
    box-shadow: 0 0 0 2px #F3F3F3 !important;
}

/* Croix de fermeture overlay */
.mjc-overlay-close-wrap {
    position: absolute;
    top: 10px;
    right: 18px;
    z-index: 10;
}
.mjc-close-btn {
    background: none;
    border: none;
    font-size: 1.9rem;
    color: #B4252B;
    cursor: pointer;
    width: 38px;
    height: 38px;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mjc-close-btn::after {
    content: " X ";
    font-weight: 400;
}
.mjc-btn-red,
.mjc-btn-red:link,
.mjc-btn-red:visited{
    flex:1 1 160px;          /* largeur identique */
    display:flex;            /* même hauteur + centrage */
    align-items:center;
    justify-content:center;
    min-height:56px;         /* hauteur fixe */
    background:#B4252B;
    color:#fff;
    border:none;
    text-decoration:none;
    padding:0 .9rem;
    border-radius:8px;
    font-weight:600;
    cursor:pointer;
    transition:filter .2s;
}
.mjc-btn-red:hover{filter:brightness(1.08)}

}

.mjc-center-btn {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* ROUE */

#mjc-wheel-overlay {
    position: fixed; z-index: 9000; top:0; left:0; right:0; bottom:0; background: rgba(40,40,40,0.7);
    display: flex; align-items: center; justify-content: center;
}
.mjc-wheel-box {
    background: #fff; border-radius: 14px; box-shadow: 0 8px 30px #0002;
    padding: 34px 30px 24px 30px; text-align: center; position: relative;
    min-width: 350px; max-width: 96vw;
}
.mjc-btn-red, .mjc-btn-primary { background: #B4252B; color:#fff; border:0; border-radius:8px; padding:12px 28px; font-size:1.1em; cursor:pointer; }
.mjc-btn-red[disabled] { opacity:0.6; }



/* EXPLICATIONS */

.mjc-explication + .mjc-big,
.mjc-explication + button.mjc-big {
    display: block;
    margin: 2rem auto 0 auto;
    text-align: center;
}

/* TIRAGE AU SORT */
.mjc-btn-gagnant {
    margin: 22px auto 0;
    display: block;
    font-size: 1.2em;
    background: #b4252b;
    color: #fff;
    border-radius: 9px;
    padding: 14px 28px;
    cursor: pointer;
    border: 0;
    box-shadow: 0 2px 12px #b4252b22;
}
#mjc-gagnant-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30,30,30,0.30);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mjc-gagnant-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px #0003;
    max-width: 480px;   /* largeur max */
    width: 40vw;        /* largeur responsive */
    min-width: 30vw; 
    padding: 36px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 600px) {
    .mjc-gagnant-modal {
        padding: 22px 6vw 18px;
        max-width: 98vw;
        font-size: 1em;
    }
}
@keyframes mjc-in { from { opacity: 0; transform: translateY(40px) scale(.98);} }
.mjc-gagnant-modal h3 { margin-top: 0; font-size: 1.3em; }
.mjc-gagnant-modal input[type="email"] {
    padding: 10px; margin: 14px 0 12px;
    width: 92%; max-width: 350px; font-size: 1.1em;
    border: 1px solid #ccc; border-radius: 5px;
}
.mjc-gagnant-modal button {
    background: #b4252b;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 9px 22px;
    font-weight: bold;
    margin: 9px 5px 0;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.15s;
}
.mjc-gagnant-modal button:hover {
    background: #921c1f;
}
#mjc-gagnant-result { font-size: 1.07em; margin: 14px 0 0 0; }
#mjc-gagnant-msg {
    white-space: normal;
    word-break: break-word;
    font-size: 1.1em;
}

.mjc-btn-disabled,
.mjc-btn-red:disabled {
    background: #ddd !important;
    color: #aaa !important;
    border-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    box-shadow: none !important;
}

.scratchcardconcours, .scratchcardconcours img, #scratchcardconcours, #scratchcardconcours img {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
}
