/* ============================================================
   Liste des jeux
   ============================================================ */
.tilteur-jeux-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.jeux-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.jeu-card {
    border: 1px solid #dcdcde;
    padding: 16px;
    border-radius: 4px;
    text-align: center;
    background: #fff;
}

.jeu-card img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.jeu-card .button {
    display: inline-block;
    margin-top: 12px;
}

/* ============================================================
   Page de jeu — conteneur
   ============================================================ */
.tilteur-jeu-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================================
   Quiz — rubrique
   ============================================================ */
.tilteur-rubric {
    max-width: 800px;
    margin: 0 auto;
}

.rubric-header {
    margin-bottom: 28px;
}

.rubric-progress {
    font-size: 13px;
    color: #646970;
    margin: 0 0 6px;
}

.rubric-name {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 10px;
}

.rubric-legend {
    font-size: 14px;
    color: #646970;
    font-style: italic;
    margin: 0 0 8px;
}

.rubric-description {
    font-size: 14px;
    color: #3c434a;
}

.rubric-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* ============================================================
   Quiz — questions
   ============================================================ */
.rubric-questions {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.jeu-question {
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 20px;
    background: #fff;
		display: flex;
  	gap: 15px;
		justify-content: space-between;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.jeu-question.question-error {
    border-color: #d63638;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.15);
}

.question-content {
    margin-bottom: 14px;
		flex: 1 1 50%;
		align-content: center;
		text-align: center;
}

.question-wording {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.5;
}

.question-image {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    display: block;
    margin-top: 8px;
}

.question-hint {
    font-size: 13px;
    color: #646970;
    margin: 0 0 12px;
}

.question-answers {
		flex: 0 0 50%;

}

/* ============================================================
   Quiz — réponses
   ============================================================ */
.reponses {
    display: flex;
  flex-direction: column;
  gap: 25px;
  justify-content: space-around;
	flex: 1 1 50%;
}

.reponse-card {
    /* position: relative; */
    border: 2px solid #dcdcde;
    border-radius: 4px;
    padding: 12px 32px 12px 12px; /* right padding pour la coche */
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    user-select: none;
    background: #fff;
		justify-content: space-between;
}

.reponse-card:hover {
    border-color: #5fa70d;
    background-color: #b7e7b5;
}

.reponse-card.selected {
    border-color: #5fa70d;
    background-color: #b7e7b5;
}

.reponse-label {
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
}

.reponse-image {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    display: block;
}

/* Coche positionnée en haut à droite */
.reponse-checkmark {
    /*position: absolute;
    top: 6px;
    right: 8px;*/
    flex-shrink: 0;
    align-self: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #dcdcde;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    transition: border-color 0.15s, background-color 0.15s;
}

.reponse-card.selected .reponse-checkmark {
    border-color: #5fa70d;
    background-color: #5fa70d;
    color: #fff;
}

.reponse-card.selected .reponse-checkmark::after {
    content: '✓';
}

/* ============================================================
   Quiz — mode résultat (réutilise .reponse-card)
   Bonne réponse sélectionnée : vert
   Mauvaise réponse sélectionnée : orange
   Bonne réponse non sélectionnée : vert sans fond plein
   ============================================================ */
.reponse-card.result-correct-selected {
    border-color: #00a32a;
    background-color: #edfaef;
}

.reponse-card.result-correct-selected .reponse-checkmark {
    border-color: #00a32a;
    background-color: #00a32a;
    color: #fff;
}

.reponse-card.result-correct-selected .reponse-checkmark::after {
    content: '✓';
}

.reponse-card.result-wrong-selected {
    border-color: #d63638;
    background-color: #fef0f0;
}

.reponse-card.result-wrong-selected .reponse-checkmark {
    border-color: #d63638;
    background-color: #d63638;
    color: #fff;
}

.reponse-card.result-wrong-selected .reponse-checkmark::after {
    content: '✗';
}

/* Bonne réponse que le joueur n'avait pas sélectionnée */
.reponse-card.result-correct-missed {
    border-color: #00a32a;
    background-color: #fff;
}

.reponse-card.result-correct-missed .reponse-checkmark {
    border-color: #00a32a;
    color: #00a32a;
}

.reponse-card.result-correct-missed .reponse-checkmark::after {
    content: '✓';
}

/* Mode sondage/test : réponse choisie par l'utilisateur */
.reponse-card.result-user-selected {
    border-color: #2271b1;
    background-color: #f0f6fc;
}

.reponse-card.result-user-selected .reponse-checkmark {
    border-color: #2271b1;
    background-color: #2271b1;
    color: #fff;
}

.reponse-card.result-user-selected .reponse-checkmark::after {
    content: '✓';
}

/* Bandeau de participation (affiché entre les questions et le traitement) */
.result-participation {
    font-size: 14px;
    color: #646970;
    margin: 24px 0 0;
    padding: 10px 14px;
    background: #f6f7f7;
    border-left: 3px solid #dcdcde;
    border-radius: 2px;
}

/* ============================================================
   Quiz — navigation
   ============================================================ */
.rubric-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #dcdcde;
}

.nav-spacer {
    flex: 1;
}

.rubric-error {
    width: 100%;
    margin: 0;
    color: #d63638;
    font-size: 14px;
    padding: 8px 12px;
    background: #fef0f0;
    border-left: 3px solid #d63638;
    border-radius: 2px;
}

.tilteur-error {
    color: #d63638;
    padding: 12px 16px;
    border-left: 4px solid #d63638;
    background: #fef0f0;
    border-radius: 2px;
}

/* ============================================================
   Résultats inline (rendu AJAX après soumission)
   ============================================================ */
.jeu-resultat-inline {
    max-width: 800px;
    margin: 0 auto;
}

.result-treatment {
    margin-top: 40px;
    padding: 20px;
    background: #f0fdf4;
    border-left: 4px solid #00a32a;
    border-radius: 2px;
}

.result-treatment-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.result-treatment-content {
    font-size: 15px;
    line-height: 1.6;
}

.result-questions {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.result-questions .reponse-card {
    pointer-events: none;
    cursor: default;
}

/* Produits recommandés — résultat inline */
.result-products-block {
    margin-top: 40px;
}

.result-products-heading {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
}

.result-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.result-product-card {
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s;
}

.result-product-card:hover {
    border-color: #2271b1;
}

.result-product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    padding: 12px;
    gap: 8px;
}

.result-product-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.result-product-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.result-product-price {
    font-size: 14px;
    color: #646970;
}

/* ============================================================
   Mes Résultats — actions RGPD
   ============================================================ */
.jeux-results-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tilteur-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s;
}

.tilteur-btn-secondary {
    background: #fff;
    border-color: #2271b1;
    color: #2271b1;
}

.tilteur-btn-secondary:hover {
    background: #f0f6fc;
}

.tilteur-btn-danger {
    background: #fff;
    border-color: #d63638;
    color: #d63638;
}

.tilteur-btn-danger:hover {
    background: #fef0f0;
}

.delete-confirm-message {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px;
    color: #3c434a;
}

.delete-confirm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   Consentement RGPD
   ============================================================ */
.tilteur-consent {
    padding: 12px 16px;
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
    margin-bottom: 20px;
}

.consent-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #3c434a;
    cursor: pointer;
}

.consent-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #2271b1;
}

/* ============================================================
   Règlement personnalisé (customRule)
   ============================================================ */
.tilteur-custom-rule {
    padding: 20px 24px;
    background: #fff8e5;
    border-left: 4px solid #dba617;
    border-radius: 4px;
    margin-bottom: 24px;
}

.custom-rule-notice {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    color: #3c434a;
}

.custom-rule-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 12px;
}

.custom-rule-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #5fa70d;
}

.custom-rule-read-btn {
    background: none;
    border: none;
    color: #2271b1;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.custom-rule-read-btn:hover {
    color: #135e96;
}

/* ============================================================
   Modale règlement
   ============================================================ */
.tilteur-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.tilteur-modal {
    background: #fff;
    border-radius: 6px;
    max-width: 680px;
    width: calc(100% - 40px);
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px 28px 28px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.tilteur-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #646970;
    padding: 0;
}

.tilteur-modal-close:hover {
    color: #1e1e1e;
}

.tilteur-modal-body {
    font-size: 14px;
    line-height: 1.7;
    color: #3c434a;
}

/* ============================================================
   Résultats (page dédiée via shortcode [jeu_resultat])
   ============================================================ */
.jeu-resultat {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.resultat-description {
    font-size: 15px;
    line-height: 1.6;
    margin: 16px 0;
}

.coupon {
    background: #f0fdf4;
    padding: 16px;
    margin: 20px 0;
    border-left: 4px solid #00a32a;
    border-radius: 2px;
}

/* ============================================================
   Produits recommandés
   ============================================================ */
.produits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.produit-card {
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
    background: #fff;
    transition: border-color 0.15s;
}

.produit-card:hover {
    border-color: #2271b1;
}

.produit-card a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   Bouton primaire
   ============================================================ */
.tilteur-btn-primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.tilteur-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* ============================================================
   Coupon sur carte produit
   ============================================================ */
.result-product-coupon {
    padding: 10px 12px;
    background: #f0fdf4;
    border-top: 1px solid #d1fae5;
    font-size: 13px;
}

.result-product-coupon .coupon-label {
    margin: 0 0 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #646970;
}

.result-product-coupon .coupon-code {
    margin: 0 0 2px;
    font-family: monospace;
    font-size: 14px;
    font-weight: 700;
    color: #00a32a;
    letter-spacing: .05em;
}

.result-product-coupon .coupon-discount {
    margin: 0 0 2px;
    font-weight: 600;
    color: #1d2327;
}

.result-product-coupon .coupon-expiry-wrap,
.result-product-coupon .coupon-expiry {
    margin: 0;
    font-size: 12px;
    color: #646970;
}

.btn-add-to-cart,
.btn-view-product {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0;
    border-radius: 0 0 4px 4px;
    padding: 8px 12px;
    box-sizing: border-box;
}

/* ============================================================
   Partage réseaux sociaux
   ============================================================ */
.tilteur-share {
    margin: 24px 0;
}

.share-label {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-facebook {
    background: #1877F2;
    color: #fff;
}

.share-twitter {
    background: #000;
    color: #fff;
}

.share-linkedin {
    background: #0A66C2;
    color: #fff;
}