/* Riwaq Académie — parcours de réservation par étapes. Couleurs Riwaq : #111c18 (vert nuit), #bc9b6a (or). */
.riwaq-wizard { --ink: #111c18; --gold: #bc9b6a; --gold-d: #9c7d4f; --soft: #faf6ef; --line: #e9e3d8; --muted: #6f6f6a; --ok: #2e6b3a; --ko: #a33; color: var(--ink); margin: 24px auto; max-width: 1180px; font-size: 15px; }
.riwaq-wizard * { box-sizing: border-box; }
.rqw { display: grid; grid-template-columns: 250px minmax(0, 1fr) 280px; background: #fff; border-radius: 10px; box-shadow: 0 10px 40px rgba(17, 28, 24, .10); overflow: hidden; min-height: 520px; position: relative; }
.rqw-side { padding: 32px 24px; border-right: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; }
.rqw-icon { width: 76px; height: 76px; margin: 0 auto 16px; color: var(--ink); background: radial-gradient(circle at 30% 30%, var(--soft) 0 55%, transparent 56%); padding: 10px; }
.rqw-icon svg { width: 100%; height: 100%; }
.rqw-side h2 { font-size: 20px; margin: 0 0 8px; }
.rqw-side p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }
.rqw-progress { display: flex; gap: 6px; justify-content: center; margin: 22px 0; }
.rqw-progress span { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.rqw-progress .is-done { background: var(--gold); }
.rqw-progress .is-on { background: var(--ink); }
.rqw-help { margin-top: auto; font-size: 13px; color: var(--muted); }
.rqw-help strong { color: var(--ink); }
.rqw-main { display: flex; flex-direction: column; min-width: 0; }
.rqw-head { padding: 22px 28px; border-bottom: 1px solid var(--line); }
.rqw-head h3 { margin: 2px 0 0; font-size: 19px; }
.rqw-count { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rqw-body, .rqw-pad { padding: 24px 28px; flex: 1; }
.rqw-foot { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-top: 1px solid var(--line); }
.rqw-err { flex: 1; color: var(--ko); font-size: 13px; text-align: right; }
.rqw-back { background: none; border: 0; cursor: pointer; font: inherit; color: var(--ink); padding: 8px 0; }
.rqw-next, .rqw-btn { background: var(--ink); color: #fff; border: 0; border-radius: 6px; padding: 11px 20px; cursor: pointer; font: inherit; font-weight: 600; text-decoration: none; display: inline-block; }
.rqw-next:hover:not([disabled]), .rqw-btn:hover { background: #22332c; color: #fff; }
.rqw-next[disabled] { opacity: .45; cursor: not-allowed; }
.rqw-primary { background: var(--gold); }
.rqw-lead { font-weight: 600; margin: 18px 0 10px; }
.rqw-lead:first-child { margin-top: 0; }
.rqw-muted { color: var(--muted); font-size: 13px; }
.rqw-error { color: var(--ko); font-weight: 600; }
.rqw-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.rqw-chip { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.rqw-chip strong { display: block; font-size: 15px; }
.rqw-chip small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.rqw-chip:hover { border-color: var(--gold); }
.rqw-chip.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--soft); }
.rqw-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.rqw-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.rqw-form input { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: inherit; color: var(--ink); }
.rqw-note { margin-top: 18px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; line-height: 1.55; }
.rqw-note.ok { border-color: #bcd8c3; background: #f2f8f3; }
.rqw-note.ko { border-color: #e4bcbc; background: #fbf3f3; }
.rqw-note details { margin-top: 8px; }
.rqw-note ol { max-height: 220px; overflow: auto; margin: 6px 0 0; padding-left: 22px; font-size: 13px; }
.rqw-note li.ok { color: var(--ok); }
.rqw-note li.ko { color: var(--ko); text-decoration: line-through; }
.rqw-later { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.rqw-pill { display: inline-block; background: var(--ink); color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 8px; margin-left: 6px; }
.rqw-cal { max-width: 430px; }
.rqw-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 10px; }
.rqw-cal-head strong { font-size: 24px; text-transform: capitalize; font-weight: 500; }
.rqw-cal-head strong span { color: var(--muted); font-size: 15px; }
.rqw-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 20px; line-height: 1; color: var(--ink); }
.rqw-nav:not([disabled]):hover { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.rqw-nav[disabled] { opacity: .3; cursor: default; }
.rqw-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rqw-grid > span:nth-child(-n+7) { font-size: 12px; color: var(--muted); text-align: center; padding: 4px 0; background: #f6f4ef; }
.rqw-d { position: relative; height: 46px; border: 0; background: none; font: inherit; font-size: 16px; color: #c4c0b8; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
button.rqw-d { color: var(--ink); cursor: pointer; }
button.rqw-d:hover { background: var(--soft); }
.rqw-d em { position: absolute; left: 6px; right: 6px; bottom: 5px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--gold) var(--fill), #e7e4dd var(--fill)); }
.rqw-d.mark { font-weight: 700; }
.rqw-d.is-on { background: var(--ink); color: #fff; }
.rqw-d.is-on em { opacity: .6; }
.rqw-times-title { margin: 20px 0 10px; font-size: 15px; border-top: 1px solid var(--line); padding-top: 14px; }
.rqw-times-title small { color: var(--muted); }
.rqw-part { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.rqw-part:first-of-type { border-top: 0; }
.rqw-part > span { padding-top: 9px; font-size: 13px; color: var(--muted); }
.rqw-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.rqw-t { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 6px 0; cursor: pointer; font: inherit; font-variant-numeric: tabular-nums; transition: background-color .15s, color .15s, border-color .15s; }
.rqw-t:hover { background: var(--ink); border-color: var(--ink); color: var(--gold, #bc9b6a); }
.rqw-t.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 600px) {
	.rqw-part { grid-template-columns: minmax(0, 1fr); gap: 6px; }
	.rqw-part > span { padding-top: 0; }
	.rqw-times { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 360px) { .rqw-times { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rqw-chosen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rqw-tag { background: var(--ink); color: #fff; border-radius: 16px; padding: 5px 6px 5px 12px; font-size: 13px; }
.rqw-tag button { background: rgba(255,255,255,.18); border: 0; color: #fff; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; margin-left: 4px; line-height: 1; }
.rqw-sum { background: #fcfbf8; border-left: 1px solid var(--line); padding: 22px 22px; display: flex; flex-direction: column; }
.rqw-sum h3 { margin: 0 0 14px; font-size: 18px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.rqw-sum-img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: 10px; }
.rqw-sum-title { display: block; margin-bottom: 10px; }
.rqw-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; }
.rqw-line span:first-child { color: var(--muted); flex-shrink: 0; }
.rqw-line span:last-child { text-align: right; }
.rqw-cost { margin-top: auto; padding-top: 18px; }
.rqw-cost-t { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 4px; }
.rqw-total { display: flex; justify-content: space-between; border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 8px; font-size: 18px; font-weight: 600; }
.rqw-recap .rqw-line { font-size: 15px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rqw-rules { margin: 18px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.rqw-bar { display: none; }

/* Tablette : le résumé passe sous le contenu. */
@media (max-width: 1080px) {
	.rqw { grid-template-columns: 220px minmax(0, 1fr); }
	.rqw-sum { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
	.rqw-sum-img { display: none; }
}
/* Mobile : une colonne, étape compacte, total collé en bas. */
@media (max-width: 720px) {
	.riwaq-wizard { margin: 0 -8px; }
	.rqw { grid-template-columns: 1fr; border-radius: 0; box-shadow: none; padding-bottom: 54px; }
	.rqw-side { flex-direction: row; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
	.rqw-icon { width: 46px; height: 46px; margin: 0; padding: 6px; flex-shrink: 0; }
	.rqw-side h2 { font-size: 17px; margin: 0; }
	.rqw-side p, .rqw-help { display: none; }
	.rqw-progress { margin: 0 0 0 auto; }
	.rqw-progress span { width: 10px; }
	.rqw-head { display: none; }
	.rqw-body { padding: 16px; }
	.rqw-foot { position: sticky; bottom: 54px; background: #fff; padding: 10px 16px; z-index: 2; box-shadow: 0 -6px 14px rgba(0, 0, 0, .05); }
	.rqw-next { flex: 1; padding: 13px; }
	.rqw-foot { flex-wrap: wrap; }
	.rqw-err { order: -1; flex-basis: 100%; text-align: left; }
	.rqw-chips { grid-template-columns: 1fr 1fr; }
	.rqw-d { height: 42px; }
	.rqw-sum { display: none; }
	.rqw-bar { display: flex; justify-content: space-between; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; height: 54px; padding: 0 16px; background: var(--ink); color: #fff; z-index: 3; font-size: 14px; }
	.rqw-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 12px; opacity: .85; }
	.rqw-bar strong { font-size: 17px; }
	/* Bouton WhatsApp du site (extension WP WhatsApp Chat) : au-dessus de la barre du total. */
	body:has(.riwaq-wizard) .qlwapp__container { bottom: 56px !important; }
}

/* Lot 8 : séances à la carte (défaut) ou même horaire chaque semaine. */
.rqw-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.rqw-mode { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; font: inherit; }
.rqw-mode small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.rqw-mode:hover { border-color: var(--gold); }
.rqw-mode.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--soft); }
.rqw-mode:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.rqw-count { margin: 10px 0 4px; font-size: 14px; }
.rqw-count input { width: 72px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
@media (max-width: 640px) { .rqw-modes { grid-template-columns: 1fr; } }

/* Retirer ou changer de cours (résumé et barre mobile). */
.rqw-sum-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.rqw-sum-head h3 { border-bottom: 0; margin-bottom: 0; }
.rqw-x { appearance: none; flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), color 160ms ease, border-color 160ms ease; }
.rqw-x:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .rqw-x:hover { color: var(--ko); border-color: var(--ko); } }
.rqw-change { appearance: none; background: none; border: 0; padding: 0; margin: -4px 0 12px; font: inherit; font-size: 13px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; cursor: pointer; align-self: flex-start; }
.rqw-bar .rqw-x { width: 28px; height: 28px; margin-right: 10px; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.rqw-bar > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 10px; }

/* ================================================================ Plein écran (05/11/2026)
   La carte occupe la hauteur de l'écran sous l'en-tête ; seule la colonne du milieu défile,
   la barre « Retour / Suivant » reste toujours visible. --rqw-top = hauteur de l'en-tête (wizard.js). */
.entry-content > .riwaq-wizard, .riwaq-wizard { max-width: min(1180px, calc(100vw - 32px)) !important; width: 100%; margin: 16px auto 24px !important; }
@media (min-width: 1081px) {
	.rqw {
		grid-template-rows: minmax(0, 1fr);
		height: clamp(560px, calc(100vh - var(--rqw-top, 120px) - 40px), 880px);
		height: clamp(560px, calc(100svh - var(--rqw-top, 120px) - 40px), 880px);
		min-height: 0; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 2px 4px rgba(17, 28, 24, .04), 0 18px 48px rgba(17, 28, 24, .08);
	}
	.rqw-main { min-height: 0; }
	.rqw-body, .rqw-pad { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d9cdb8 transparent; }
	.rqw-side, .rqw-sum { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
	.rqw-foot { background: #fff; }
	.rqw-next, .rqw-btn { border-radius: 999px; padding: 12px 26px; transition: background-color 180ms ease, color 180ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1); }
	.rqw-next:active:not([disabled]), .rqw-btn:active { transform: scale(0.97); }
}
/* Tablette : hauteur au moins égale à l'écran (le résumé passe dessous). */
@media (max-width: 1080px) and (min-width: 721px) {
	.rqw { min-height: calc(100svh - var(--rqw-top, 120px) - 40px); border-radius: 16px; }
	.rqw-foot { position: sticky; bottom: 0; background: #fff; z-index: 2; }
}
/* Téléphone : plein écran comme une application (barre « Suivant » collée, total en bas). */
@media (max-width: 720px) {
	.entry-content > .riwaq-wizard, .riwaq-wizard { max-width: none !important; width: auto; margin: 0 !important; }
	/* overflow visible : sinon la carte devient le cadre de la barre collante (marge comptée deux fois). */
	.rqw { min-height: calc(100svh - var(--rqw-top, 70px)); display: flex; flex-direction: column; overflow: visible; }
	.rqw-err:empty { display: none; }
	.rqw-main { flex: 1; }
	.rqw-next { border-radius: 999px; }
}

/* Boutons de choix alignés (niveau, pour qui, matière…) : grille régulière, même hauteur.
   Bureau : côte à côte, largeur égale. Téléphone : un par ligne, pleine largeur. */
.rqw-chips { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: stretch; gap: 12px; }
.rqw-chips:has(.rqw-chip small) { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rqw-chip { display: flex; flex-direction: column; justify-content: flex-start; height: 100%; min-height: 64px; padding: 14px 16px; border-radius: 12px;
	transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1); }
.rqw-chip small { font-size: 13px; line-height: 1.4; margin-top: 4px; }
.rqw-chip:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .rqw-chip:not(.is-on):hover { border-color: var(--gold); } }
@media (max-width: 720px) {
	.rqw-chips:has(.rqw-chip small) { grid-template-columns: 1fr; gap: 8px; }
	.rqw-chips:has(.rqw-chip small) .rqw-chip { min-height: 0; padding: 12px 14px; }
}
/* Nombre de colonnes selon le nombre de choix (bureau) : 2 -> 2, 3 -> 3, 4 -> 2 × 2. */
@media (min-width: 721px) {
	.rqw-chips:has(> .rqw-chip:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rqw-chips:has(> .rqw-chip:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rqw-chips:has(> .rqw-chip:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
