/**
 * Allolangue brand palette — single source of truth for front-end colors.
 * Load after main.css; overrides duplicate :root tokens safely.
 *
 * Primary: Navy #0A2038 | Secondary: Navy Light #102844
 * Accent: Gold #D3A054
 */
:root {
  --alo-navy: #0A2038;
  --alo-navy-light: #102844;
  --alo-gold: #D3A054;
  --alo-gold-hover: #B8893F;
  --alo-gold-light: #EDD5B3;
  --alo-bg: #FFFFFF;
  --alo-surface: #F8F9FB;
  --alo-text-dark: #0A2038;
  --alo-text-secondary: #5E6A79;
  --alo-border: #E5E7EB;
  --alo-navy-rgb: 10, 32, 56;
  --alo-gold-rgb: 211, 160, 84;

  --it-common-white: var(--alo-bg);
  --it-heading-primary: var(--alo-text-dark);
  --it-text-body: var(--alo-text-secondary);
  --it-gray-1: var(--alo-surface);
  --it-gray-2: var(--alo-border);
  --it-gray-3: var(--alo-surface);
  --it-gray-4: var(--alo-surface);

  --it-theme-1: var(--alo-navy);
  --it-theme-2: var(--alo-gold);
  --it-theme-3: var(--alo-navy-light);
  --it-theme-4: var(--alo-navy-light);
  --it-theme-5: var(--alo-gold);
  --it-theme-6: var(--alo-gold);

  --it-theme-primary: var(--alo-navy);
  --theme-color: var(--alo-gold);

  /* Bootstrap (front) — align utility colors with brand neutrals */
  --bs-primary: var(--alo-navy);
  --bs-primary-rgb: var(--alo-navy-rgb);
  --bs-secondary: var(--alo-text-secondary);
  --bs-secondary-rgb: 94, 106, 121;
  --bs-warning: var(--alo-gold);
  --bs-warning-rgb: var(--alo-gold-rgb);
  --bs-body-color: var(--alo-text-dark);
  --bs-body-bg: var(--alo-bg);
  --bs-border-color: var(--alo-border);
  --bs-light: var(--alo-surface);
  --bs-light-rgb: 248, 249, 251;
  --bs-link-color: var(--alo-navy);
  --bs-link-hover-color: var(--alo-navy-light);
}

.theme-color {
  color: var(--alo-gold);
}

.footer-bg {
  background-color: var(--alo-navy) !important;
}

.site-breadcrumb-bg {
  background-color: var(--alo-surface) !important;
}

/* Bootstrap component alignment (front-end only) */
.btn-primary {
  --bs-btn-bg: var(--alo-navy);
  --bs-btn-border-color: var(--alo-navy);
  --bs-btn-hover-bg: var(--alo-navy-light);
  --bs-btn-hover-border-color: var(--alo-navy-light);
  --bs-btn-active-bg: var(--alo-navy-light);
  --bs-btn-active-border-color: var(--alo-navy-light);
}

.btn-warning {
  --bs-btn-bg: var(--alo-gold);
  --bs-btn-border-color: var(--alo-gold);
  --bs-btn-color: var(--alo-text-dark);
  --bs-btn-hover-bg: var(--alo-gold-hover);
  --bs-btn-hover-border-color: var(--alo-gold-hover);
  --bs-btn-hover-color: var(--alo-text-dark);
}

.text-primary {
  color: var(--alo-navy) !important;
}

.text-muted {
  color: var(--alo-text-secondary) !important;
}

.text-warning {
  color: var(--alo-gold) !important;
}

.bg-light {
  background-color: var(--alo-surface) !important;
}

.border {
  border-color: var(--alo-border) !important;
}

.btn-secondary {
  --bs-btn-bg: var(--alo-text-secondary);
  --bs-btn-border-color: var(--alo-text-secondary);
  --bs-btn-hover-bg: var(--alo-navy-light);
  --bs-btn-hover-border-color: var(--alo-navy-light);
}

.form-text,
.text-secondary,
.breadcrumb-item.active,
.page-link.disabled,
.disabled {
  color: var(--alo-text-secondary) !important;
}

/* Home — course languages showcase */
.alo-languages-area {
  background: linear-gradient(180deg, var(--alo-surface) 0%, var(--alo-bg) 100%);
}

.alo-languages-area .it-course-section-title-box {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.alo-languages-area .it-section-subtitle,
.alo-languages-area .it-section-title,
.alo-languages-area .color-txt-base-2 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.alo-languages-area .row > [class*="col-"] {
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .alo-languages-area .row > [class*="col-"] {
    margin-bottom: 30px;
  }
}

.alo-language-card {
  display: block;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px rgba(var(--alo-navy-rgb), 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.alo-language-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(var(--alo-navy-rgb), 0.16);
  color: inherit;
}

.alo-language-card__media {
  position: relative;
  /* Source banners are ~1740×750 (~16:7) — keep that ratio on all viewports */
  aspect-ratio: 16 / 7;
  width: 100%;
  background: var(--alo-navy-light);
  overflow: hidden;
}

.alo-language-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.alo-language-card:hover .alo-language-card__image {
  transform: scale(1.04);
}

.alo-language-card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 32px 20px 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(var(--alo-navy-rgb), 0.82) 65%);
  text-align: center;
}

.alo-language-card__title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.alo-language-card__cta {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--alo-gold);
  opacity: 0.95;
  transition: letter-spacing 0.3s ease;
}

.alo-language-card:hover .alo-language-card__cta {
  letter-spacing: 0.03em;
}

@media (max-width: 767px) {
  .alo-language-card__media {
    /* Keep wide banner ratio so full artwork shows on mobile */
    aspect-ratio: 16 / 7;
    min-height: 0;
  }

  .alo-language-card__title {
    font-size: 1.15rem;
  }

  .alo-language-card__overlay {
    padding: 24px 14px 14px;
  }
}

/* Header — mobile dashboard user icon (replaces lang switcher below md) */
.it-header-user-btn {
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--alo-gold);
  color: var(--alo-navy);
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(var(--alo-navy-rgb), 0.12);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.it-header-user-btn i {
  font-size: 16px;
  line-height: 1;
}

.it-header-user-btn:hover,
.it-header-user-btn:focus-visible {
  background: var(--alo-gold-hover);
  color: var(--alo-navy);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--alo-navy-rgb), 0.18);
  outline: none;
}

.it-header-user-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(var(--alo-navy-rgb), 0.14);
}

/* Header actions: tighter spacing (esp. French long labels) */
.it-header-right-action {
  gap: 10px;
}

/* Keep header CTA compact across browsers (Firefox otherwise grows taller) */
.it-header-right-action .it-btn-yellow {
  font-size: 14px;
  padding: 10px 16px;
  min-height: 43px;
  height: 43px;
  line-height: 1;
  gap: 6px;
  box-sizing: border-box;
}

.it-header-right-action .it-btn-yellow > span {
  line-height: 1.15;
  height: 1.15em;
  display: inline-block;
  overflow: hidden;
}

.it-header-right-action .it-btn-yellow svg {
  width: 13px;
  height: 13px;
  margin-inline-end: 6px;
}

/* Header search: give room; keep lang switcher slightly apart */
.it-header-right-action .it-lang-select {
  flex-shrink: 0;
  margin-inline-end: 6px;
}

.it-header-right-action .it-header-search-wrap {
  flex: 1 1 auto;
  min-width: 180px;
  max-width: 240px;
}

.it-header-right-action .it-header-search {
  width: 100%;
  max-width: none;
}

.it-header-right-action .it-header-search input {
  width: 100%;
  min-width: 0;
}

@media only screen and (min-width: 1400px) {
  .it-header-right-action .it-header-search-wrap {
    min-width: 200px;
    max-width: 255px;
  }
}

/* Flag images (Chrome on Windows often fails to render flag emoji) */
.it-lang-select .it-lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 14px;
  flex-shrink: 0;
  line-height: 0;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.it-lang-select .it-lang-flag img {
  display: block;
  width: 21px;
  height: 14px;
  object-fit: cover;
}

html[lang="fr"] .it-header-menu > nav > ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
  padding-right: 0;
  margin: 0;
}

html[lang="fr"] .it-header-menu > nav > ul > li {
  margin: 0 7px;
  flex-shrink: 0;
}

html[lang="fr"] .it-header-menu > nav > ul > li:first-child {
  margin-left: 0;
}

html[lang="fr"] .it-header-menu > nav > ul > li:last-child {
  margin-right: 0;
}

html[lang="fr"] .it-header-menu > nav > ul > li > a {
  font-size: 14px;
  padding: 28px 0;
  white-space: nowrap;
}

html[lang="fr"] .it-header-right-action {
  gap: 8px;
  margin-right: 0;
}

html[lang="fr"] .it-lang-select {
  margin-left: 0;
  margin-inline-end: 8px;
}

html[lang="fr"] .it-lang-select-trigger {
  min-width: 0;
  padding: 8px 12px;
}

html[lang="fr"] .it-header-search {
  max-width: none;
}

html[lang="fr"] .it-header-search-wrap {
  margin-left: 0;
  min-width: 160px;
  max-width: 200px;
}

html[lang="fr"] .it-header-right-action .it-btn-yellow {
  margin-right: 0 !important;
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
  html[lang="fr"] .it-header-right-action {
    margin-right: 0;
  }

  html[lang="fr"] .it-header-menu > nav > ul > li {
    margin: 0 5px;
  }

  html[lang="fr"] .it-header-menu > nav > ul > li > a {
    font-size: 13px;
  }

  html[lang="fr"] .it-header-search-wrap {
    min-width: 150px;
    max-width: 180px;
  }
}

/* Home slider: keep <picture> full-bleed like bare <img> */
.it-slider-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.it-slider-bg picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Keep every fade slide the same footprint */
.it-slider-active .swiper-slide {
  height: auto;
}

.it-slider-active .swiper-slide .it-slider-box {
  height: 100%;
}

/* Home slider — stable text colors (override conflicting mobile rules in main.css) */
.it-slider-wrap .it-slider-title-h6 {
  color: var(--alo-navy);
}

.it-slider-wrap .it-slider-title {
  color: var(--alo-gold);
}

.it-slider-wrap .it-slider-content p.color-txt-base {
  color: var(--alo-text-secondary) !important;
}

/* Home slider — mobile: crop image, hide CTA, fix title size & overlap */
@media (max-width: 767px) {
  .it-slider-wrap .it-slider-box {
    min-height: 460px;
  }

  .it-slider-wrap .it-slider-bg img {
    object-fit: cover;
    object-position: center 28%;
    transform: none;
  }

  .it-slider-wrap .it-slider-overlay::after {
    z-index: 0;
    background: linear-gradient(
      180deg,
      rgba(248, 249, 251, 0.92) 0%,
      rgba(248, 249, 251, 0.78) 42%,
      rgba(248, 249, 251, 0.2) 72%,
      rgba(248, 249, 251, 0) 100%
    );
  }

  .it-slider-wrap .it-slider-content {
    position: relative;
    z-index: 1;
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .it-slider-wrap .it-slider-title-h6 {
    font-size: 15px;
    line-height: 1.5;
    color: var(--alo-navy);
    margin-bottom: 8px;
  }

  .it-slider-wrap .it-slider-title {
    font-size: 28px !important;
    line-height: 1.3;
    margin-bottom: 12px;
  }

  .it-slider-wrap .it-slider-content p.color-txt-base {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 0 !important;
    color: var(--alo-text-secondary) !important;
  }

  /* Hide CTA on mobile — overlaps illustration */
  .it-slider-wrap .it-slider-btn {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .it-slider-wrap .it-slider-title {
    font-size: 26px !important;
  }

  .it-slider-wrap .it-slider-title-h6 {
    font-size: 14px;
    color: var(--alo-navy);
  }
}

/* Home slider — navigation (outside swiper to stay above fade slides) */
.it-slider-wrap .it-slider-arrow-wrap {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  display: none;
}

@media (min-width: 768px) {
  .it-slider-wrap .it-slider-arrow-wrap {
    display: block;
  }
}

.it-slider-wrap .it-slider-arrow-wrap button {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #fff;
  color: var(--alo-navy);
  box-shadow: 0 8px 24px rgba(10, 32, 56, 0.28);
  pointer-events: auto;
  transform: translateY(-50%);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.it-slider-wrap .it-slider-arrow-wrap button svg {
  width: 20px;
  height: auto;
}

html[dir=rtl] .it-slider-wrap .it-slider-arrow-wrap .arrow-prev {
  right: 24px;
  left: auto;
}

html[dir=rtl] .it-slider-wrap .it-slider-arrow-wrap .arrow-next {
  left: 24px;
  right: auto;
}

html[dir=rtl] .it-slider-wrap .it-slider-arrow-wrap button svg {
  transform: scaleX(-1);
}

html[dir=ltr] .it-slider-wrap .it-slider-arrow-wrap .arrow-prev {
  left: 24px;
  right: auto;
}

html[dir=ltr] .it-slider-wrap .it-slider-arrow-wrap .arrow-next {
  right: 24px;
  left: auto;
}

.it-slider-wrap .it-slider-arrow-wrap button:hover,
.it-slider-wrap .it-slider-arrow-wrap button:focus-visible {
  color: var(--alo-navy);
  border-color: var(--alo-gold);
  background: var(--alo-gold);
  box-shadow: 0 10px 28px rgba(var(--alo-gold-rgb), 0.45);
  outline: none;
}

.it-slider-wrap .it-slider-arrow-wrap button:active {
  transform: translateY(-50%) scale(0.96);
}

.it-slider-wrap .it-slider-arrow-wrap button.swiper-button-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.it-slider-wrap .it-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: auto;
  pointer-events: auto;
}

.it-slider-wrap .it-slider-dots .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.75);
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.it-slider-wrap .it-slider-dots .swiper-pagination-bullet-active {
  background: var(--alo-gold);
  border-color: var(--alo-gold);
  transform: scale(1.2);
}

@media only screen and (max-width: 991px) {
  .it-slider-wrap .it-slider-arrow-wrap button {
    width: 46px;
    height: 46px;
  }

  html[dir=rtl] .it-slider-wrap .it-slider-arrow-wrap .arrow-prev {
    right: 12px;
  }

  html[dir=rtl] .it-slider-wrap .it-slider-arrow-wrap .arrow-next {
    left: 12px;
  }

  html[dir=ltr] .it-slider-wrap .it-slider-arrow-wrap .arrow-prev {
    left: 12px;
  }

  html[dir=ltr] .it-slider-wrap .it-slider-arrow-wrap .arrow-next {
    right: 12px;
  }

  .it-slider-wrap .it-slider-dots {
    bottom: 18px;
  }
}

@media only screen and (min-width: 992px) {
  .it-slider-wrap .it-slider-dots {
    display: none !important;
  }
}

/* Course accent — only titles, icons, badges, CTAs, side borders (never full card bg) */
.course-accent-scope {
  --course-accent: var(--alo-gold);
}

.course-accent-scope .course-accent-title,
.course-accent-scope .course-accent-title a {
  color: var(--course-accent);
}

.course-accent-scope .course-accent-icon,
.course-accent-scope .course-accent-icon svg,
.course-accent-scope .course-accent-icon i {
  color: var(--course-accent);
  fill: currentColor;
}

.course-accent-scope .course-accent-badge {
  color: var(--course-accent);
  border: 1px solid var(--course-accent);
  background: color-mix(in srgb, var(--course-accent) 12%, white);
}

.course-accent-scope .course-accent-cta,
.course-accent-scope a.course-accent-cta,
.course-accent-scope button.course-accent-cta {
  background-color: var(--course-accent) !important;
  border-color: var(--course-accent) !important;
  color: #fff !important;
}

.course-accent-scope .course-accent-cta:hover,
.course-accent-scope a.course-accent-cta:hover,
.course-accent-scope button.course-accent-cta:hover {
  filter: brightness(0.92);
  color: #fff !important;
}

.course-accent-scope.course-accent-border,
.course-accent-scope .course-accent-border {
  border-inline-start: 3px solid var(--course-accent);
}

