/*
Theme Name:   Collectif WEB — MJL Formation
Theme URI:    https://collectif-web.ca
Description:  Thème enfant pour la plateforme de formation Maison Jean Lapointe. Basé sur Hello Elementor.
Author:       Collectif WEB
Author URI:   https://collectif-web.ca
Template:     hello-elementor
Version:      1.0.0
Text Domain:  mjl-formation
License:      GNU General Public License v3 or later.
License URI:  https://www.gnu.org/licenses/gpl-3.0.html
*/

/* ============================================================
   Brand tokens — Maison Jean Lapointe
   ============================================================ */
:root {
  --mjl-primary:   #1D3A8F;
  --mjl-secondary: #0060E5;
  --mjl-accent:    #DEF2FC;
  --mjl-orange:    #F5940C;
  --mjl-purple:    #6D1E91;
  --mjl-text:      #1D3A8F;
}

/* ============================================================
   Cohérence avec le site principal
   ============================================================ */
.elementor-widget-container p:last-child { margin-bottom: 0; }
html { overflow-x: hidden; }

.elementor-widget-text-editor a {
  text-decoration: underline;
  font-weight: bold;
  color: var(--mjl-primary);
}
.elementor-widget-text-editor ul { padding-left: 22px; }
.elementor-widget-text-editor li { padding-bottom: 22px; }

.elementor-location-header {
  position: sticky;
  top: 0;
  transition: top 0.3s;
  width: 100%;
  z-index: 9999;
}

/* ============================================================
   LearnDash — styles de base (à enrichir quand LD sera installé)
   ============================================================ */
.learndash-wrapper .ld-focus .ld-focus-header { background-color: var(--mjl-primary); }
.learndash-wrapper .btn-blue,
.learndash-wrapper .ld-button { background-color: var(--mjl-secondary); }
.learndash-wrapper .btn-blue:hover,
.learndash-wrapper .ld-button:hover { background-color: var(--mjl-primary); }

/* ============================================================
   Page Connexion — login form brandé
   ============================================================ */
.mjl-login-wrap {
  max-width: 440px;
  margin: 48px auto 80px;
  padding: 40px 36px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(29, 58, 143, 0.10);
  border-top: 4px solid var(--mjl-primary);
  font-family: 'Roboto', sans-serif;
}
.mjl-login-wrap h2 {
  font-family: 'Roboto Slab', serif;
  color: var(--mjl-primary);
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
}
.mjl-login-intro {
  text-align: center;
  color: #555;
  margin: 0 0 28px;
  font-size: 15px;
}
.mjl-login-wrap .login-username,
.mjl-login-wrap .login-password { margin-bottom: 18px; }
.mjl-login-wrap label {
  display: block;
  font-weight: 500;
  color: var(--mjl-primary);
  margin-bottom: 6px;
  font-size: 14px;
}
.mjl-login-wrap input[type="text"],
.mjl-login-wrap input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d4dceb;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.mjl-login-wrap input[type="text"]:focus,
.mjl-login-wrap input[type="password"]:focus {
  outline: none;
  border-color: var(--mjl-secondary);
  box-shadow: 0 0 0 3px rgba(0, 96, 229, 0.15);
}
.mjl-login-wrap .login-remember {
  margin: 8px 0 22px;
  font-size: 14px;
  color: #555;
}
.mjl-login-wrap .login-remember label { display: inline; font-weight: 400; }
.mjl-login-wrap .button-primary,
.mjl-login-wrap input[type="submit"] {
  width: 100%;
  padding: 13px;
  background: var(--mjl-secondary);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s;
  text-transform: none;
  letter-spacing: 0;
}
.mjl-login-wrap .button-primary:hover,
.mjl-login-wrap input[type="submit"]:hover { background: var(--mjl-primary); }
.mjl-login-extra {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #ecf0f7;
  text-align: center;
  font-size: 14px;
}
.mjl-login-extra a {
  color: var(--mjl-secondary);
  text-decoration: none;
  font-weight: 500;
}
.mjl-login-extra a:hover { color: var(--mjl-primary); text-decoration: underline; }
/* ============================================================
   LearnDash — Polish post-audit (2026-05-13)
   À appendre à la fin de style.css du child theme
   ============================================================ */

/* --- Focus Mode : couleurs de marque MJL --- */
.learndash-wrapper .ld-focus-header,
.learndash-wrapper .ld-focus-sidebar .sfwd-mark-complete .learndash_mark_complete_button,
.learndash-wrapper .ld-focus-sidebar .ld-button:not(.ld-button-alternate) {
  background-color: var(--mjl-primary);
  color: #fff;
}
.learndash-wrapper .ld-focus-header a,
.learndash-wrapper .ld-focus-header .ld-focus-header__inner,
.learndash-wrapper .ld-focus-header .ld-breadcrumbs,
.learndash-wrapper .ld-focus-header .ld-breadcrumbs__link {
  color: #fff;
}
.learndash-wrapper .ld-progress-bar-percentage {
  background-color: var(--mjl-secondary);
}
.learndash-wrapper .ld-focus .ld-focus-main .ld-focus-content {
  padding: 24px 24px 48px;
}

/* --- Nav redondante : masquer prev/next quand la leçon est seule (cours à 1 leçon) --- */
.learndash-wrapper .ld-navigation--no-progress .ld-navigation__previous,
.learndash-wrapper .ld-navigation--no-progress .ld-navigation__next {
  display: none;
}

/* --- Breadcrumb : le dernier item (aria-current) ne doit pas être un lien actif --- */
.learndash-wrapper .ld-breadcrumbs__link[aria-current="page"] {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
  color: inherit;
}

/* --- Focus visible : a11y WCAG 2.4.7 --- */
.learndash-wrapper a:focus-visible,
.learndash-wrapper button:focus-visible,
.learndash-wrapper .ld-button:focus-visible {
  outline: 3px solid var(--mjl-secondary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- SCORM iframe (GrassBlade) : aspect-ratio responsive --- */
.grassblade-iframe-container,
.gb_iframe_wrapper,
.grassblade-content-wrapper iframe {
  max-width: 100%;
}
.grassblade-iframe-container iframe {
  width: 100% !important;
  aspect-ratio: 16 / 10;
  height: auto !important;
  min-height: 600px;
  border: 0;
  display: block;
}
@media (max-width: 720px) {
  .grassblade-iframe-container iframe {
    aspect-ratio: 4 / 3;
    min-height: 480px;
  }
}

/* --- Bouton "Marquer complété" : alignement + brand --- */
.learndash-wrapper #sfwd-mark-complete .learndash_mark_complete_button,
.learndash-wrapper .ld-button.learndash_mark_complete_button {
  background-color: var(--mjl-secondary);
  border-color: var(--mjl-secondary);
  font-weight: 600;
  padding: 12px 28px;
  transition: background-color .18s ease, transform .12s ease;
}
.learndash-wrapper #sfwd-mark-complete .learndash_mark_complete_button:hover,
.learndash-wrapper .ld-button.learndash_mark_complete_button:hover {
  background-color: var(--mjl-primary);
  border-color: var(--mjl-primary);
  transform: translateY(-1px);
}

/* --- Course navigation widget (sidebar Focus Mode) : tonal --- */
.learndash-wrapper .ld-course-navigation .ld-item-list-item--current > .ld-item-list-item-preview,
.learndash-wrapper .ld-course-navigation .ld-table-list-item--current {
  background-color: var(--mjl-accent);
  border-left: 3px solid var(--mjl-primary);
}
.learndash-wrapper .ld-course-navigation .ld-item-list-item-preview:hover {
  background-color: var(--mjl-accent);
}

/* --- Breadcrumb spacing --- */
.learndash-wrapper .ld-breadcrumbs {
  padding: 12px 0;
}
