/* ===== Habillage AGIPI des quiz QSM =====
 * S'applique aux quiz dont l'habillage est activé (onglet « Habillage AGIPI ») : leur conteneur porte la classe .agq.
 * Personnalisation d'un quiz : champ CSS de l'onglet « Style » de QSM, en ciblant .qsm-quiz-container-<id>.
 */
.qsm-quiz-container.agq{--agq-blue:#1E78CD;--agq-pink:#DC1690;--agq-navy:#2C3449;--agq-lav:#E5E7F6;--agq-lav2:#CDD2F3;--agq-bg:#F3F3F7;--agq-pinkbg:#FBE4F1;--agq-grey:#9A9DAB;--agq-line:#C9CCD8;max-width:520px;width:100%;margin:0 auto;padding:0;background:var(--agq-bg);border-radius:24px;overflow:hidden;box-shadow:0 12px 32px rgba(44,52,73,.10);font-family:"Source Sans Pro",sans-serif;color:var(--agq-navy);text-align:left;}
.agq .qsm-quiz-form{margin:0;padding:0 24px 24px;}
.agq p{color:inherit;}
/* --- Accueil --- */
.agq .agq-hero{position:relative;margin:0 -24px;padding:30px 24px 80px;background:var(--agq-lav);clip-path:polygon(0 0,100% 0,100% calc(100% - 50px),0 100%);}
.agq .agq-hero-l1{position:relative;display:inline-block;padding-left:26px;}
.agq .agq-hero-l1:before{content:"";position:absolute;left:0;top:-8px;width:20px;height:28px;background:url("../images/trois-traits-rose.svg") no-repeat center/contain;transform:scaleX(-1);}
.agq .agq-hero-title{font-family:Tajawal,sans-serif;font-weight:700;font-size:27px;line-height:1.3;color:var(--agq-navy);margin:28px 0 0;padding:0;}
.agq .agq-hl{position:relative;color:var(--agq-pink);white-space:nowrap;}
.agq .agq-hl svg{position:absolute;left:-2px;right:0;bottom:-8px;width:105%;height:10px;}
.agq .quiz_begin{padding:0;margin:0;}
.agq .qsm-before-message,.agq .mlw_qmn_message_before{margin:0;padding:0;}
.agq .qsm-before-message p{font-size:16px;font-weight:600;line-height:1.55;margin:4px 0 0;}
/* --- Barres segmentees --- */
.agq .agq-seg{display:flex;gap:5px;margin:20px 0 0;}
.agq .agq-seg span{flex:1;height:4px;border-radius:4px;background:var(--agq-lav2);}
.agq .agq-seg span.done{background:var(--agq-blue);}
.agq .agq-seg span.cur{background:var(--agq-pink);}
.agq .agq-top{display:none;padding-top:22px;}
.agq.agq-on-question .agq-top{display:block;}
.agq .agq-top-row{display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:14px;}
.agq .agq-top-label{color:var(--agq-pink);}
.agq .agq-top-count{color:var(--agq-blue);}
.agq .agq-top .agq-seg{margin:10px 0 24px;}
/* --- Question --- */
.agq .qsm-question-wrapper{margin:0;padding:0;border:0;}
.agq .mlw_qmn_new_question{display:block!important;font-weight:400;margin:0;}
.agq .agq-qtitle{display:block;font-family:Tajawal,sans-serif;font-weight:700;font-size:23px;line-height:1.3;color:var(--agq-navy);}
.agq fieldset{border:0;margin:0;padding:0;min-width:0;}
.agq fieldset legend{display:none;}
/* --- Reponses --- */
.agq .qmn_radio_answers{counter-reset:agq;display:flex;flex-direction:column;gap:12px;margin:22px 0 0;padding:0;border:0!important;background:none!important;}
.agq .qmn_radio_answers .qmn_mc_answer_wrap{counter-increment:agq;position:relative;margin:0!important;padding:0!important;display:flex;background:#fff;border:2px solid transparent;border-radius:12px;box-shadow:0 2px 8px rgba(44,52,73,.08);transition:border-color .15s,background .15s;}
.agq .qmn_radio_answers .qmn_mc_answer_wrap:hover{border-color:var(--agq-lav2);}
.agq .qmn_radio_answers input[type=radio]{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none;}
.agq .qmn_radio_answers label.qsm-input-label{display:flex!important;align-items:center;gap:14px;width:100%;margin:0!important;padding:13px 16px!important;cursor:pointer;font-size:17px!important;line-height:1.3!important;font-weight:600;color:var(--agq-navy);}
.agq .qmn_radio_answers label.qsm-input-label:before{content:none;flex:0 0 32px;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--agq-lav) no-repeat center/14px;color:var(--agq-blue);font-weight:700;font-size:14px;}
.agq .qsm-question-wrapper:has(.quick-question-res-p) .qmn_radio_answers{pointer-events:none;}
.agq .qsm-question-wrapper:has(.quick-question-res-p) .qmn_mc_answer_wrap{background:#F8F8FA;box-shadow:none;}
.agq .qsm-question-wrapper:has(.quick-question-res-p) .qmn_mc_answer_wrap label.qsm-input-label{color:var(--agq-grey);}
.agq .qsm-question-wrapper:has(.quick-question-res-p) .qmn_mc_answer_wrap label.qsm-input-label:before{opacity:.65;}
.agq .qmn_radio_answers .qmn_mc_answer_wrap.agq-correct{background:var(--agq-blue);box-shadow:0 6px 14px rgba(30,120,205,.28);}
.agq .qmn_radio_answers .qmn_mc_answer_wrap.agq-correct label.qsm-input-label{color:#fff;}
.agq .qmn_radio_answers .qmn_mc_answer_wrap.agq-correct label.qsm-input-label:before{content:"";opacity:1;background-color:#fff;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNCAxNCcgZmlsbD0nbm9uZScgc3Ryb2tlPScjMUU3OENEJyBzdHJva2Utd2lkdGg9JzIuNCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtbGluZWpvaW49J3JvdW5kJz48cGF0aCBkPSdNMyA3LjVsMi43IDIuN0wxMSA0LjUnLz48L3N2Zz4=");}
.agq .qmn_radio_answers .qmn_mc_answer_wrap.agq-wrong{background:#fff;border-color:var(--agq-pink);box-shadow:0 2px 8px rgba(44,52,73,.08);}
.agq .qmn_radio_answers .qmn_mc_answer_wrap.agq-wrong label.qsm-input-label{color:var(--agq-pink);}
.agq .qmn_radio_answers .qmn_mc_answer_wrap.agq-wrong label.qsm-input-label:before{content:"";opacity:1;background-color:var(--agq-pink);background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNCAxNCcgZmlsbD0nbm9uZScgc3Ryb2tlPScjZmZmJyBzdHJva2Utd2lkdGg9JzIuNCcgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJz48cGF0aCBkPSdNNCA0bDYgNk0xMCA0bC02IDYnLz48L3N2Zz4=");}
/* --- Feedback --- */
.agq .quick-question-res-p{display:flex!important;align-items:center;gap:14px;margin:22px 0 0!important;padding:16px!important;border:0!important;border-radius:12px;font-size:15px;font-weight:600;color:var(--agq-navy)!important;background:var(--agq-lav)!important;}
.agq .quick-question-res-p.qsm-incorrect-answer-info{background:var(--agq-pinkbg)!important;}
.agq .agq-fb-icon{padding-top:6px;flex:0 0 40px;height:40px;border-radius:8px;background:#fff;display:flex;align-items:center;justify-content:center;font-family:Tajawal,sans-serif;font-weight:700;font-size:20px;color:var(--agq-blue);}
.agq .qsm-incorrect-answer-info .agq-fb-icon{color:var(--agq-pink); }
.agq .agq-fb-body strong{display:block;font-family:Tajawal,sans-serif;font-size:19px;line-height:1.2;color:var(--agq-blue);margin-bottom:2px;}
.agq .qsm-incorrect-answer-info .agq-fb-body strong{color:var(--agq-pink);}
.agq .qsm-inline-correct-info:empty{display:none;}
/* --- Boutons --- */
.agq .qsm-pagination{display:flex!important;flex-direction:column;align-items:stretch;gap:0;border:0!important;margin:28px 0 0!important;padding:0!important;background:none!important;}
.agq .qsm-previous,.agq .qsm-progress-bar,.agq .qmn_page_message,.agq .qmn_page_counter_message{display:none!important;}
.agq .qsm-pagination .qsm-btn{width:100%!important;max-width:none;margin:0!important;padding:15px 20px!important;border:0!important;border-radius:100px!important;background:var(--agq-pink)!important;color:#fff!important;font-family:"Source Sans Pro",sans-serif;font-size:16px!important;font-weight:700!important;line-height:1.2!important;text-align:center;text-decoration:none;box-shadow:0 6px 16px rgba(220,22,144,.25);cursor:pointer;white-space:normal;}
.agq .qsm-pagination a.qsm-btn:after{content:"\2192";margin-left:8px;}
.agq .qsm-pagination .qsm-btn:hover{background:#c0127c!important;}
.agq.agq-on-question:not(.agq-answered) .qsm-pagination .qsm-btn{background:#CACCD6!important;box-shadow:none;pointer-events:none;}
.agq .qmn_error_message_section:not(:empty){margin:16px 0 0;padding:10px 14px;border:0;border-radius:10px;background:var(--agq-pinkbg);color:var(--agq-pink);font-weight:600;font-size:14px;}
.agq .qmn_error{background:none!important;border-color:transparent!important;}
/* bouton final : passe devant les regles QSM .qsm-submit-btn */
.qsm-quiz-container.agq .qsm-pagination .qmn_btn.qsm-submit-btn{background:var(--agq-pink)!important;}
.qsm-quiz-container.agq .qsm-pagination .qmn_btn.qsm-submit-btn:hover{background:#c0127c!important;}
.qsm-quiz-container.agq.agq-on-question:not(.agq-answered) .qsm-pagination .qmn_btn.qsm-submit-btn{background:#CACCD6!important;}
/* --- Resultats --- */
.agq .qsm-results-page{padding:20px 20px 24px;margin:0;font-size:16px;}
.agq .qsm-results-page br{display:none;}
.agq .qsm_questions_answers_section{margin:0;padding:0;}
.agq .qmn_question_answer .mlw_qmn_question{margin:0;padding:0;}
.agq .qmn_question_answer [class*="qsm-text-"][class*="-option"]{display:flex!important;align-items:center;gap:10px;margin:0;padding:5px 0!important;font-size:15px;font-weight:600;color:var(--agq-grey)!important;background:none!important;}
.agq .qmn_question_answer [class*="qsm-text-"][class*="-option"]:before{content:""!important;flex:0 0 20px;width:20px;height:20px;margin:0!important;border-radius:50%;border:1.5px solid var(--agq-line);box-sizing:border-box;background:#fff no-repeat center/11px;font-size:0!important;position:static!important;}
.agq .qmn_question_answer [class*="qsm-text-"].qsm-text-correct-option{color:var(--agq-blue)!important;}
.agq .qmn_question_answer [class*="qsm-text-"].qsm-text-correct-option:before{border:0;background-color:var(--agq-blue);background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNCAxNCcgZmlsbD0nbm9uZScgc3Ryb2tlPScjZmZmJyBzdHJva2Utd2lkdGg9JzIuNicgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJyBzdHJva2UtbGluZWpvaW49J3JvdW5kJz48cGF0aCBkPSdNMyA3LjVsMi43IDIuN0wxMSA0LjUnLz48L3N2Zz4=");}
.agq .qmn_question_answer [class*="qsm-text-"].qsm-text-wrong-option{color:var(--agq-pink)!important;}
.agq .qmn_question_answer [class*="qsm-text-"].qsm-text-wrong-option:before{border:0;background-color:var(--agq-pink);background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxNCAxNCcgZmlsbD0nbm9uZScgc3Ryb2tlPScjZmZmJyBzdHJva2Utd2lkdGg9JzIuNicgc3Ryb2tlLWxpbmVjYXA9J3JvdW5kJz48cGF0aCBkPSdNNCA0bDYgNk0xMCA0bC02IDYnLz48L3N2Zz4=");}
@media (max-width:480px){.qsm-quiz-container.agq{border-radius:18px;}.agq .qsm-quiz-form{padding:0 18px 20px;}.agq .agq-hero{margin:0 -18px;padding:26px 18px 72px;}.agq .agq-hero-title{font-size:24px;}.agq .agq-qtitle{font-size:21px;}.agq .qsm-results-page{padding:16px 14px 20px;}}

/* ----- Logo (accueil et écran final) ----- */
.agq .agq-hero-logo,
.agq .agq-end-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: 150px;
}
.agq .agq-hero-logo {
	margin: 0 0 20px;
}
.agq .agq-end-logo {
	height: 120px;
	margin: 0 auto 20px;
}
@media (max-width: 480px) {
	.agq .agq-hero-logo {
		height: 120px;
	}
	.agq .agq-end-logo {
		height: 100px;
	}
}

/* ----- Écran final ----- */
.agq .agq-end {
	position: relative;
	overflow: hidden;
	padding: 32px 28px 28px;
	border-radius: 24px;
	background: linear-gradient(180deg, #22305a 0%, #1a2547 100%);
	color: #fff;
	text-align: center;
}
.agq .agq-end > :not(.agq-confetti) {
	position: relative;
	z-index: 1;
}
.agq .agq-end p {
	margin: 0;
	color: inherit;
}
.agq .agq-end-label {
	font-size: 18px;
	font-weight: 600;
}

/* Anneau de score */
.agq .agq-ring {
	position: relative;
	width: 150px;
	height: 150px;
	margin: 16px auto 20px;
}
.agq .agq-ring-svg {
	display: block;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}
.agq .agq-ring-svg circle {
	fill: none;
	stroke-width: 9;
}
.agq .agq-ring-track {
	stroke: rgba(255, 255, 255, 0.85);
}
.agq .agq-ring-arc {
	stroke-linecap: round;
	transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.agq .agq-ring-val {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 44px;
	font-weight: 700;
	line-height: 1;
}
.agq .agq-ring-val small {
	font-size: 24px;
	font-weight: 600;
	margin-left: 2px;
}

/* Message */
.agq .agq-end-title {
	font-size: 40px;
	font-weight: 700;
	line-height: 1.15;
}
.agq .agq-end-sub {
	margin-top: 6px !important;
	font-size: 16px;
	opacity: 0.9;
}

/* Remerciement */
.agq .agq-end-thanks {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 24px 0 20px;
	padding: 16px 20px;
	border-radius: 14px;
	background: #e9eefb;
	color: #1E78CD;
	font-size: 15px;
	line-height: 1.4;
	text-align: left;
}
.agq .agq-end-trophy {
	flex: none;
	font-size: 30px;
	line-height: 1;
}

/* Lien vers le détail des réponses, sous la carte */
.agq .agq-details-link {
	display: block;
	margin: 22px auto 0;
	padding: 4px 8px;
	border: 0;
	background: none;
	color: #1a2547;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.agq .agq-details-link:hover,
.agq .agq-details-link:focus-visible {
	color: #DC1690;
}

.agq .agq-details[hidden] {
	display: none !important;
}
.agq .agq-details {
	margin-top: 24px;
	scroll-margin-top: 120px;
}

/* ----- Partage du score ----- */
.agq .agq-share {
	margin-top: 24px;
	text-align: center;
}
.agq .agq-share p {
	margin: 0;
}
.agq .agq-share-title {
	color: #fff;
	font-size: 16px;
	font-weight: 700;
}
.agq .agq-share-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 12px;
}
.agq .agq-share .agq-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 18px;
	border: 1px solid #fff;
	border-radius: 999px;
	background: #fff;
	color: #1a2547;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.agq .agq-share .agq-share-btn,
.agq .agq-share .agq-share-btn:hover,
.agq .agq-share .agq-share-btn:focus,
.agq .agq-share .agq-share-btn span {
	text-decoration: none !important;
}
.agq .agq-share .agq-share-btn:hover,
.agq .agq-share .agq-share-btn:focus-visible {
	transform: translateY(-1px);
	border-color: currentColor;
}
/* Couleurs des plateformes (picto + texte) */
.agq .agq-share .agq-share-fb,
.agq .agq-share .agq-share-fb:hover,
.agq .agq-share .agq-share-fb:focus {
	color: #1877f2;
}
.agq .agq-share .agq-share-ig,
.agq .agq-share .agq-share-ig:hover,
.agq .agq-share .agq-share-ig:focus {
	color: #e1306c;
}
.agq .agq-share .agq-share-li,
.agq .agq-share .agq-share-li:hover,
.agq .agq-share .agq-share-li:focus {
	color: #0a66c2;
}
.agq .agq-share .agq-share-wa,
.agq .agq-share .agq-share-wa:hover,
.agq .agq-share .agq-share-wa:focus {
	color: #1da851;
}
.agq .agq-share-icon {
	flex: none;
	width: 18px;
	height: 18px;
}
.agq .agq-share-note {
	margin-top: 10px !important;
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
}
.agq .agq-share-note[hidden] {
	display: none !important;
}

/* ----- Détail des réponses : accordéon condensé ----- */
.agq .agq-details .agq-details-title {
	margin: 0 0 12px;
	color: #1a2547;
	font-size: 22px;
	font-weight: 700;
}
.agq .agq-details .qmn_question_answer.agq-acc {
	margin: 0 0 10px !important;
	padding: 0 !important;
	border: 1px solid #e3e7f2 !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: none !important;
	overflow: hidden;
}
.agq .agq-details .qmn_question_answer.agq-acc-ko {
	border-color: #f6c9e1 !important;
	background: #fdeef6 !important;
}
.agq .agq-acc .agq-acc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 0;
	background: none;
	color: #1a2547;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.agq .agq-acc .agq-acc-head:focus-visible {
	outline: 2px solid #1E78CD;
	outline-offset: -2px;
}
.agq .agq-acc-text {
	flex: 1;
	min-width: 0;
}
.agq .agq-acc-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
}
.agq .agq-acc-num {
	font-size: 14px;
	font-weight: 700;
	color: #1a2547;
}
.agq .agq-acc-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #1E78CD;
}
.agq .agq-acc-ko .agq-acc-status {
	color: #DC1690;
}
.agq .agq-acc-icon {
	flex: none;
	width: 16px;
	height: 16px;
}
.agq .agq-acc-q {
	display: block;
	margin-top: 2px;
	overflow: hidden;
	font-size: 13px;
	color: #4a5068;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.agq .agq-acc-open .agq-acc-q {
	white-space: normal;
}
.agq .agq-acc-chevron {
	flex: none;
	width: 20px;
	height: 20px;
	color: #1E78CD;
	transition: transform 0.2s ease;
}
.agq .agq-acc-open .agq-acc-chevron {
	transform: rotate(180deg);
}
.agq .agq-acc-body[hidden] {
	display: none !important;
}
.agq .agq-acc-body {
	padding: 0 16px 14px;
	font-size: 14px;
}

/* Cotillons (seuil réglable par quiz) */
.agq .agq-confetti {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}
.agq .agq-confetti i {
	position: absolute;
	top: -20px;
	width: 4px;
	height: 14px;
	border-radius: 2px;
	opacity: 0;
	animation-name: agq-confetti-fall;
	animation-timing-function: cubic-bezier(0.25, 0.6, 0.5, 1);
	animation-fill-mode: forwards;
}
@keyframes agq-confetti-fall {
	0% {
		opacity: 1;
		transform: translate(0, 0) rotate(0deg);
	}
	80% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translate(var(--agq-drift, 0), 620px) rotate(var(--agq-rot, 360deg));
	}
}
@media (prefers-reduced-motion: reduce) {
	.agq .agq-confetti {
		display: none;
	}
	.agq .agq-ring-arc {
		transition: none;
	}
}

@media (max-width: 480px) {
	.agq .agq-end {
		padding: 24px 18px 20px;
	}
	.agq .agq-end-title {
		font-size: 32px;
	}
}
