/* Cours offerts (inc/commencer.php) : les trois cartes [wakademy_cours_offerts] et l'habillage de la fenêtre
   d'inscription de Simple LMS (.simple-lms-popup-*, markup du plugin, jamais modifié ici : seulement des styles).
   Chargée sur toutes les pages publiques, après tokens.css. Les tokens --wk-* suivent le mode sombre tout seuls. */

/* ---------- Les cartes ---------- */
.wk-offerts > h2.wp-block-heading { margin: 0 auto 2rem; }
.wk-offerts__cartes { display: grid; gap: 1.25rem; }
.wk-offerts__carte { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--wk-rayon-grand); background: var(--wk-carte); border: 1px solid rgba(57, 41, 29, .08); transition: transform .35s var(--wk-ease), border-color .35s; }
.wk-offerts__carte:hover { transform: translateY(-4px); border-color: rgba(196, 135, 56, .5); }
.wk-offerts__visuel { aspect-ratio: 3 / 2; overflow: hidden; background: var(--wk-creme); }
.wk-offerts__visuel img, .wk-offerts__visuel .simple-lms-dessin { display: block; width: 100%; height: 100%; object-fit: cover; }
.wk-offerts__corps { display: flex; flex: 1; flex-direction: column; gap: .5rem; padding: 1.25rem 1.25rem 1.4rem; }
.wk-offerts__corps > * { margin: 0; }
.wk-offerts p.wk-offerts__niveau { font-size: var(--wp--preset--font-size--xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--wk-or-texte); }
.wk-offerts h3.wk-offerts__titre { max-width: none; font-size: var(--wp--preset--font-size--l); line-height: 1.15; text-wrap: balance; }
.wk-offerts p.wk-offerts__texte { font-size: var(--wp--preset--font-size--s); line-height: 1.45; color: var(--wk-taupe); }
.wk-offerts p.wk-offerts__infos { margin-top: auto; padding-top: .5rem; font-size: var(--wp--preset--font-size--xs); font-weight: 800; color: var(--wk-or-texte); font-variant-numeric: tabular-nums; }
.wk-offerts__action { margin-top: .5rem; }
.wk-offerts__action .simple-lms-popup-container { margin: 0; text-align: left; }
.wk-offerts__action .simple-lms-popup-trigger { width: 100%; }
/* Toute la carte est cliquable : le bouton « S'inscrire gratuitement » s'étend sur la carte (un seul élément à
   focaliser au clavier, un seul clic à mesurer). Le survol de la carte allume aussi le bouton. */
.wk-offerts__carte { position: relative; cursor: pointer; }
.wk-offerts__action .simple-lms-popup-container, .wk-offerts__action .simple-lms-popup-trigger { position: static; }
.wk-offerts__action .simple-lms-popup-trigger::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.wk-offerts__carte:hover .simple-lms-popup-trigger { background: var(--wk-or-survol, var(--wk-ambre)); }
.wk-offerts__carte:has(.simple-lms-popup-trigger:focus-visible) { outline: 3px solid var(--wk-or); outline-offset: 3px; }
.wk-offerts__action .simple-lms-popup-trigger:focus-visible { outline: none; }
@media (min-width: 62rem) {
	.wk-offerts__cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (min-width: 40rem) and (max-width: 61.99rem) {
	.wk-offerts__cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wk-offerts__carte:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.wk-offerts__carte:last-child:nth-child(odd) .wk-offerts__visuel { aspect-ratio: 3 / 1; }
}

/* ---------- Le bouton qui ouvre la fenêtre : pilule du thème ---------- */
body .simple-lms-popup-trigger, body .simple-lms-popup-trigger:hover {
	display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem; border: 0; border-radius: var(--wk-rayon-bouton, 50px);
	background: var(--wk-or); color: var(--wk-sur-or); font: 800 var(--wp--preset--font-size--m) / 1 var(--wk-police); cursor: pointer; box-shadow: none; transform: none; transition: background-color .2s;
}
body .simple-lms-popup-trigger:hover { background: var(--wk-or-survol, var(--wk-ambre)); }
/* Bouton dans un hero, avec le lien vers la première leçon à côté */
.gratuit-hero__inscription { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; }
.gratuit-hero__inscription .simple-lms-popup-container { margin: 0; }
.gratuit-hero__inscription a.gratuit-hero__apercu { display: inline-flex; align-items: center; gap: .4rem; color: var(--wk-or-texte); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.gratuit-hero__inscription a.gratuit-hero__apercu::before { content: ""; width: 1.25rem; height: 1.25rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m10 8 6 4-6 4V8Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m10 8 6 4-6 4V8Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.wk-section--bande .simple-lms-popup-container, .wk-texte-centre .simple-lms-popup-container, .gratuit-inscription-centre .simple-lms-popup-container { text-align: center; margin: 0; }

/* Fenêtre ouverte : la page derrière ne défile plus (classe posée par offerts.js), sans saut de largeur. */
html.wk-fenetre-ouverte, html.wk-fenetre-ouverte body { overflow: hidden; }
html.wk-fenetre-ouverte body { padding-right: var(--wk-barre-defilement, 0px); }
body .simple-lms-popup-overlay { overscroll-behavior: contain; }
body .simple-lms-popup-content { overscroll-behavior: contain; }

/* ---------- La fenêtre d'inscription (Simple LMS) aux couleurs du site ---------- */
body .simple-lms-popup-overlay { background: rgba(28, 20, 14, .6); padding: 0; align-items: flex-end; }
body .simple-lms-popup-content { max-width: 100%; max-height: calc(100dvh - .75rem); border-radius: var(--wk-rayon-grand) var(--wk-rayon-grand) 0 0; background: var(--wk-creme); color: var(--wk-ecorce); font-family: var(--wk-police); box-shadow: 0 -12px 40px rgba(0, 0, 0, .25); }
body .simple-lms-popup-header-image-wrapper { border-radius: 0; }
body .simple-lms-popup-featured-image { height: 11rem; max-height: 11rem; }
body .simple-lms-popup-free-badge, body .simple-lms-popup-free-badge span { display: inline-block; padding: 0; background: none; border: 0; box-shadow: none; }
body .simple-lms-popup-free-badge { position: absolute; left: 1rem; right: auto; bottom: 1rem; width: auto; padding: .3rem .8rem; border-radius: 50px; background: var(--wk-or); color: var(--wk-sur-or); font-size: var(--wp--preset--font-size--xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
body .simple-lms-popup-close, body .simple-lms-popup-close:hover { background: var(--wk-sable) !important; color: var(--wk-ecorce) !important; font-size: 26px !important; box-shadow: none !important; transform: none; }
body .simple-lms-popup-close:hover { background: var(--wk-sable-fonce) !important; }
body .simple-lms-popup-custom-content { padding: 1.5rem 1.5rem 0; background: none; }
body .simple-lms-popup-custom-content h2, body .simple-lms-popup-custom-content h3 { margin: 0 0 .75rem; max-width: none; font-family: var(--wk-police); font-size: clamp(1.45rem, 1.2rem + 1vw, 1.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--wk-ecorce); text-wrap: balance; }
body .simple-lms-popup-custom-content p { margin: 0 0 .75rem; font-size: var(--wp--preset--font-size--s); line-height: 1.5; color: var(--wk-taupe); }
body .simple-lms-popup-custom-content ul, body .simple-lms-popup-custom-content ol { margin: .5rem 0 0; padding: 0; list-style: none; display: grid; gap: .4rem; color: var(--wk-ecorce); }
body .simple-lms-popup-custom-content li { position: relative; display: block; padding-left: 1.9rem; margin: 0; font-size: var(--wp--preset--font-size--s); line-height: 1.45; color: var(--wk-taupe); list-style: none; }
body .simple-lms-popup-custom-content li::before { content: ""; position: absolute; left: 0; top: .15rem; width: 1.25rem; height: 1.25rem; background: var(--wk-or); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; }
body .simple-lms-popup-custom-content strong { color: var(--wk-ecorce); font-weight: 800; }
body .simple-lms-popup-form-wrapper { padding: 1rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom)); background: none; }
body .simple-lms-popup-form-wrapper .registration-form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
body .simple-lms-popup-form-wrapper .registration-form .form-group { margin: 0; }
body .simple-lms-popup-form-wrapper .registration-form .form-group label { margin-bottom: .3rem; font-size: var(--wp--preset--font-size--xs); font-weight: 800; letter-spacing: .04em; color: var(--wk-taupe); }
body .simple-lms-popup-form-wrapper .registration-form .form-group input { padding: .85rem 1rem; border: 1.5px solid rgba(57, 41, 29, .18); border-radius: var(--wk-rayon); background: var(--wk-sable); color: inherit; font: 600 var(--wp--preset--font-size--s) / 1.3 var(--wk-police); }
body .simple-lms-popup-form-wrapper .registration-form .form-group input:focus { outline: 3px solid var(--wk-or); outline-offset: 2px; border-color: var(--wk-or); }
body .simple-lms-popup-form-wrapper .registration-form .btn-register, body .simple-lms-popup-form-wrapper .registration-form .btn-register:hover { grid-column: 1 / -1; width: 100%; min-height: 3.5rem; padding: 0 1.5rem; border: 0; border-radius: var(--wk-rayon-bouton, 50px); background: var(--wk-or); color: var(--wk-sur-or); font: 800 var(--wp--preset--font-size--m) / 1 var(--wk-police); box-shadow: none; }
body .simple-lms-popup-form-wrapper .registration-form .btn-register:hover { background: var(--wk-or-survol, var(--wk-ambre)); }
body .simple-lms-popup-form-wrapper .registration-form .btn-register:disabled { opacity: .7; cursor: wait; }
body .simple-lms-popup-form-wrapper .registration-form .form-message { grid-column: 1 / -1; margin: 0; padding: .8rem 1rem; border: 0; border-radius: var(--wk-rayon); font-size: var(--wp--preset--font-size--s); line-height: 1.45; }
body .simple-lms-popup-form-wrapper .registration-form .form-message.error { background: rgba(184, 56, 43, .1); color: var(--wk-erreur, #B8382B); }
body .simple-lms-popup-form-wrapper .registration-form .form-message.success { background: rgba(74, 155, 126, .14); color: #2F6B55; }
body .simple-lms-popup-form-wrapper .registration-info { grid-column: 1 / -1; margin: .75rem 0 0; }
body .simple-lms-popup-form-wrapper .registration-info p, body .simple-lms-popup-form-wrapper .registration-info small { color: var(--wk-taupe); font-size: var(--wp--preset--font-size--xs); line-height: 1.4; }
@media (max-width: 30rem) {
	body .simple-lms-popup-form-wrapper .registration-form { grid-template-columns: 1fr; }
}
/* Ordinateur : carte centrée */
@media (min-width: 40rem) {
	body .simple-lms-popup-overlay { padding: 1.5rem; align-items: center; }
	body .simple-lms-popup-content { max-width: 34rem; max-height: calc(100dvh - 3rem); border-radius: var(--wk-rayon-grand); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
	body .simple-lms-popup-header-image-wrapper { border-radius: var(--wk-rayon-grand) var(--wk-rayon-grand) 0 0; }
	body .simple-lms-popup-featured-image { height: 13rem; max-height: 13rem; }
}

/* ---------- Mode sombre ---------- */
@media (prefers-color-scheme: dark) {
	body.wk-sombre .wk-offerts__carte { border-color: rgba(255, 255, 255, .12); }
	body.wk-sombre .simple-lms-popup-form-wrapper .registration-form .form-group input { border-color: rgba(255, 255, 255, .16); }
	body.wk-sombre .simple-lms-popup-form-wrapper .registration-form .form-message.success { color: #6FB99A; }
}

@media (prefers-reduced-motion: reduce) {
	.wk-offerts__carte, .wk-offerts__carte:hover { transition: none; transform: none; }
}

/* ---------- Page « Commencer gratuitement » : hero centré, cartes, preuve ---------- */
.gratuit-choix .wk-chapeau { max-width: 62ch; margin-inline: auto; }
.gratuit-choix .wk-offerts { margin-top: 2.5rem; }
.gratuit-choix p.wk-preuve { margin-top: 2rem; }

/* ---------- Cours pas encore traduit (page anglaise des cours offerts, 17/09/2026) : carte non cliquable, pastille « Coming soon » ---------- */
.wk-offerts__carte--bientot { cursor: default; }
.wk-offerts__carte--bientot:hover { transform: none; border-color: rgba(57, 41, 29, .08); }
.wk-offerts__carte--bientot .wk-offerts__visuel img { filter: grayscale(.6); opacity: .75; }
.wk-offerts__carte--bientot .wk-offerts__action { margin-top: auto; padding-top: .5rem; }
.wk-offerts__bientot { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 3.25rem; padding: 0 1.6rem; border: 1.5px dashed rgba(57, 41, 29, .25); border-radius: var(--wk-rayon-bouton, 50px); color: var(--wk-taupe); font: 800 var(--wp--preset--font-size--m) / 1 var(--wk-police); }
@media (prefers-color-scheme: dark) {
	body.wk-sombre .wk-offerts__carte--bientot:hover { border-color: rgba(255, 255, 255, .12); }
	body.wk-sombre .wk-offerts__bientot { border-color: rgba(255, 255, 255, .25); }
}

/* ---------- Fenêtre allégée (17/09/2026) : titre court, pastilles chiffrées, libellés dans les champs, sans mention sous le bouton ---------- */
body .simple-lms-popup-custom-content ul.wk-fenetre-faits { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; }
body .simple-lms-popup-custom-content li.wk-fenetre-fait { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem .45rem .7rem; border-radius: 50px; background: rgba(196, 135, 56, .14); color: var(--wk-ecorce); font-size: var(--wp--preset--font-size--s); font-weight: 600; line-height: 1.2; }
body .simple-lms-popup-custom-content li.wk-fenetre-fait strong { font-weight: 900; color: var(--wk-or-texte); }
body .simple-lms-popup-custom-content li.wk-fenetre-fait::before { content: ""; position: static; flex: none; width: 1.1rem; height: 1.1rem; margin: 0; background: var(--wk-or); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.wk-fenetre-fait--video { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l10.5-6.5z'/%3E%3C/svg%3E"); }
.wk-fenetre-fait--etapes { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19h5v-5h5V9h6'/%3E%3C/svg%3E"); }
.wk-fenetre-fait--cadeau { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13M5 12v9h14v-9M7.5 8a2.5 2.5 0 1 1 4.5-2.5A2.5 2.5 0 1 1 16.5 8'/%3E%3C/svg%3E"); }
.wk-fenetre-fait--rythme { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h3.5l2-5 4 10 2.5-7 1.5 2H21'/%3E%3C/svg%3E"); }
.wk-fenetre-fait--vitesse { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 14 4-4'/%3E%3Cpath d='M3.34 19a10 10 0 1 1 17.32 0'/%3E%3C/svg%3E"); }
body .simple-lms-popup-custom-content h2 { margin-bottom: 0; }
body .simple-lms-popup-form-wrapper .form-group.wk-champ-sans-libelle label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body .simple-lms-popup-form-wrapper .form-group input::placeholder { color: var(--wk-taupe); opacity: 1; }
body .simple-lms-popup-form-wrapper .registration-info { display: none; }

/* Fenêtre (17/09, suite) : image à la une entière (format 3:2, plus de recadrage), petite phrase de bénéfice sous le titre. */
body .simple-lms-popup-featured-image, body .simple-lms-popup-overlay .simple-lms-popup-featured-image { height: auto; max-height: none; aspect-ratio: 3 / 2; }
body .simple-lms-popup-featured-image img { width: 100%; height: 100%; object-fit: cover; }
body .simple-lms-popup-custom-content p.wk-fenetre-texte { margin: .55rem 0 0; font-size: var(--wp--preset--font-size--s); line-height: 1.5; color: var(--wk-taupe); }
@media (min-width: 40rem) {
	body .simple-lms-popup-overlay .simple-lms-popup-content { max-width: 32rem; }
}
@media (max-height: 44rem) and (min-width: 40rem) {
	body .simple-lms-popup-overlay .simple-lms-popup-featured-image { aspect-ratio: 2 / 1; }
}

/* Champs de la fenêtre en pilule, comme les boutons (17/09/2026). */
body .simple-lms-popup-form-wrapper .registration-form .form-group input { border-radius: var(--wk-rayon-bouton, 50px); padding-inline: 1.25rem; }

/* ---------- Écran « Inscription en cours… » (Simple LMS, .simple-lms-loading-overlay) aux couleurs de la fenêtre (17/09/2026) ----------
   Même fond, même carte crème (sombre en mode sombre, via les jetons), mêmes polices ; roue dorée. */
body .simple-lms-loading-overlay { background: rgba(28, 20, 14, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 1.5rem; }
body .simple-lms-loading-content { max-width: 24rem; padding: 2.2rem 1.75rem 2rem; border-radius: var(--wk-rayon-grand); background: var(--wk-creme); color: var(--wk-ecorce); font-family: var(--wk-police); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
body .simple-lms-loading-content h3 { margin: 1.1rem 0 .4rem; font-family: var(--wk-police-titres, var(--wk-police)); font-size: var(--wp--preset--font-size--l); font-weight: 800; line-height: 1.2; color: var(--wk-ecorce); }
body .simple-lms-loading-content p { margin: 0; font-size: var(--wp--preset--font-size--s); line-height: 1.5; color: var(--wk-taupe); }
body .simple-lms-loading-content .simple-lms-spinner { width: 2.75rem; height: 2.75rem; margin: 0 auto; border: 3px solid var(--wk-sable); border-top-color: var(--wk-or); }
@media (prefers-color-scheme: dark) {
	body.wk-sombre .simple-lms-loading-content { border: 1px solid rgba(255, 255, 255, .1); }
	body.wk-sombre .simple-lms-loading-content .simple-lms-spinner { border-color: rgba(255, 255, 255, .12); border-top-color: var(--wk-or); }
}

/* Élève connecté : le bouton « Continuer / Commencer » de Simple LMS prend le style des pilules du site (17/09/2026). */
body .simple-lms-continue-container { margin: 0; text-align: center; }
body .simple-lms-continue-btn, body .simple-lms-continue-btn:hover { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 3.25rem; padding: 0 1.6rem; border: 0; border-radius: var(--wk-rayon-bouton, 50px); background: var(--wk-or); color: var(--wk-sur-or); font: 800 var(--wp--preset--font-size--m) / 1 var(--wk-police); cursor: pointer; box-shadow: none; transform: none; }
body .simple-lms-continue-btn:hover { background: var(--wk-or-survol, var(--wk-ambre)); }
.wk-parcours .wk-parcours__action .simple-lms-continue-btn { min-height: 2.9rem; padding: 0 .8rem; font-size: var(--wp--preset--font-size--xs); white-space: nowrap; }
.wk-offerts__carte:hover .simple-lms-continue-btn, .wk-parcours__etape--offert:hover .simple-lms-continue-btn { background: var(--wk-or-survol, var(--wk-ambre)); }
