/* ══════════════════════════════════════════════════════════════
   EduConcours — لمسات صغيرة على رأس صفحات المباراة والوحدة والامتحان
   Le dessin actuel est conservé ; on n'ajoute que des éléments du site :
   le filet tricolore, le filigrane à huit branches et le sceau.
   Retirer le <link> vers ce fichier annule les couleurs et les ornements.
   ══════════════════════════════════════════════════════════════ */

:root {
  --pc-tri: linear-gradient(90deg, #7fa9d4 0 33.3%, #3dbb72 33.3% 66.6%, #f2b01e 66.6%);
  --pc-star: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2280%22 height%3D%2280%22 viewBox%3D%220 0 80 80%22%3E%3Cg fill%3D%22none%22 stroke%3D%22%23ffffff%22 stroke-opacity%3D%22.16%22 stroke-width%3D%22.9%22 stroke-linejoin%3D%22round%22%3E%3Cpolygon points%3D%2240%2C2 48.42%2C19.67 66.87%2C13.13 60.33%2C31.58 78%2C40 60.33%2C48.42 66.87%2C66.87 48.42%2C60.33 40%2C78 31.58%2C60.33 13.13%2C66.87 19.67%2C48.42 2%2C40 19.67%2C31.58 13.13%2C13.13 31.58%2C19.67%22%2F%3E%3Cpolygon points%3D%2240%2C20 43.83%2C30.76 54.14%2C25.86 49.24%2C36.17 60%2C40 49.24%2C43.83 54.14%2C54.14 43.83%2C49.24 40%2C60 36.17%2C49.24 25.86%2C54.14 30.76%2C43.83 20%2C40 30.76%2C36.17 25.86%2C25.86 36.17%2C30.76%22%2F%3E%3Cpolygon points%3D%220%2C-38 8.42%2C-20.33 26.87%2C-26.87 20.33%2C-8.42 38%2C0 20.33%2C8.42 26.87%2C26.87 8.42%2C20.33 0%2C38 -8.42%2C20.33 -26.87%2C26.87 -20.33%2C8.42 -38%2C0 -20.33%2C-8.42 -26.87%2C-26.87 -8.42%2C-20.33%22%2F%3E%3Cpolygon points%3D%220%2C-20 3.83%2C-9.24 14.14%2C-14.14 9.24%2C-3.83 20%2C0 9.24%2C3.83 14.14%2C14.14 3.83%2C9.24 0%2C20 -3.83%2C9.24 -14.14%2C14.14 -9.24%2C3.83 -20%2C0 -9.24%2C-3.83 -14.14%2C-14.14 -3.83%2C-9.24%22%2F%3E%3Cpolygon points%3D%2280%2C-38 88.42%2C-20.33 106.87%2C-26.87 100.33%2C-8.42 118%2C0 100.33%2C8.42 106.87%2C26.87 88.42%2C20.33 80%2C38 71.58%2C20.33 53.13%2C26.87 59.67%2C8.42 42%2C0 59.67%2C-8.42 53.13%2C-26.87 71.58%2C-20.33%22%2F%3E%3Cpolygon points%3D%2280%2C-20 83.83%2C-9.24 94.14%2C-14.14 89.24%2C-3.83 100%2C0 89.24%2C3.83 94.14%2C14.14 83.83%2C9.24 80%2C20 76.17%2C9.24 65.86%2C14.14 70.76%2C3.83 60%2C0 70.76%2C-3.83 65.86%2C-14.14 76.17%2C-9.24%22%2F%3E%3Cpolygon points%3D%220%2C42 8.42%2C59.67 26.87%2C53.13 20.33%2C71.58 38%2C80 20.33%2C88.42 26.87%2C106.87 8.42%2C100.33 0%2C118 -8.42%2C100.33 -26.87%2C106.87 -20.33%2C88.42 -38%2C80 -20.33%2C71.58 -26.87%2C53.13 -8.42%2C59.67%22%2F%3E%3Cpolygon points%3D%220%2C60 3.83%2C70.76 14.14%2C65.86 9.24%2C76.17 20%2C80 9.24%2C83.83 14.14%2C94.14 3.83%2C89.24 0%2C100 -3.83%2C89.24 -14.14%2C94.14 -9.24%2C83.83 -20%2C80 -9.24%2C76.17 -14.14%2C65.86 -3.83%2C70.76%22%2F%3E%3Cpolygon points%3D%2280%2C42 88.42%2C59.67 106.87%2C53.13 100.33%2C71.58 118%2C80 100.33%2C88.42 106.87%2C106.87 88.42%2C100.33 80%2C118 71.58%2C100.33 53.13%2C106.87 59.67%2C88.42 42%2C80 59.67%2C71.58 53.13%2C53.13 71.58%2C59.67%22%2F%3E%3Cpolygon points%3D%2280%2C60 83.83%2C70.76 94.14%2C65.86 89.24%2C76.17 100%2C80 89.24%2C83.83 94.14%2C94.14 83.83%2C89.24 80%2C100 76.17%2C89.24 65.86%2C94.14 70.76%2C83.83 60%2C80 70.76%2C76.17 65.86%2C65.86 76.17%2C70.76%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}

/* ── Page d'une مباراة ── */
body .hz::before {
  background:
    var(--pc-tri) top / 100% 5px no-repeat,
    radial-gradient(circle at 88% 14%, rgba(255,255,255,.16), transparent 40%),
    radial-gradient(circle at 6% 100%, rgba(255,255,255,.08), transparent 42%);
}
body .hz::after {
  content: "";
  position: absolute;
  inset: 5px 0 0;
  background: var(--pc-star);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 22%, transparent 60%);
  mask-image: linear-gradient(to right, #000 0, #000 22%, transparent 60%);
  pointer-events: none;
}
body .hz .hz__in { z-index: 1; }

.hz .pc-hz-seal {
  position: absolute;
  left: 1.5rem; /* côté vide d'une page arabe */
  top: 50%;
  width: 150px;
  height: 150px;
  max-width: none;
  margin-top: -75px;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  direction: ltr;
}
.pc-hz-seal > span {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.35;
}
.pc-hz-seal b { font-size: 24px; letter-spacing: .05em; }
.pc-hz-seal i { font-style: normal; font-size: 14px; letter-spacing: .18em; }

@media (max-width: 999px) {
  /* Pas de place à côté du titre : petit sceau au niveau du fil d'Ariane */
  .hz .pc-hz-seal { left: 1rem; top: -16px; width: 70px; height: 70px; margin-top: 0; }
  .pc-hz-seal > span { width: calc(100% - 12px); height: calc(100% - 12px); }
  .pc-hz-seal b { font-size: 13px; }
  .pc-hz-seal i { font-size: 11px; }
  body .hz .hz__crumb { padding-left: 76px; min-height: 2.2rem; }
  body .hz::after {
    -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 55%);
    mask-image: linear-gradient(to bottom, #000 0, transparent 55%);
  }
}

/* ── Page d'une unité : le filigrane remplace la grille carrée ── */
body .module-hero::before {
  background: var(--pc-tri) top / 100% 5px no-repeat !important;
}
body .module-hero::after {
  content: "";
  position: absolute;
  inset: 5px 0 0;
  background: var(--pc-star);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 22%, transparent 60%);
  mask-image: linear-gradient(to right, #000 0, #000 22%, transparent 60%);
  pointer-events: none;
}
html[dir="ltr"] body .module-hero::after {
  -webkit-mask-image: linear-gradient(to left, #000 0, #000 22%, transparent 60%);
  mask-image: linear-gradient(to left, #000 0, #000 22%, transparent 60%);
}
body .module-hero > .container { position: relative; z-index: 1; }

body .module-hero .module-hero__icon {
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  outline: 1px solid rgba(255,255,255,.55);
  outline-offset: -8px;
  color: #fff;
  filter: none;
}
body .module-hero .module-hero__icon .edu-icon { width: 38px; height: 38px; max-width: 38px; max-height: 38px; }

@media (max-width: 700px) {
  body .module-hero::after,
  html[dir="ltr"] body .module-hero::after {
    -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 60%);
    mask-image: linear-gradient(to bottom, #000 0, transparent 60%);
  }
}

/* ── Page d'un examen et son corrigé : la couleur de sa مباراة ── */
body .ex-hero,
body .ec-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--pc-ex, #4a6c8f) 72%, #000) 0%,
    color-mix(in srgb, var(--pc-ex, #4a6c8f) 52%, #000) 100%);
}
body .ex-hero::before,
body .ec-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--pc-tri);
}
body .ex-hero::after {
  content: "";
  position: absolute;
  inset: 5px 0 auto;
  height: 330px;
  background: var(--pc-star);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, transparent 100%);
  pointer-events: none;
}
body .ec-hero::after {
  content: "";
  position: absolute;
  inset: 5px 0 0;
  background: var(--pc-star);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, transparent 100%);
  pointer-events: none;
}
body .ex-hero > *,
body .ec-hero > * { position: relative; z-index: 1; }
body .ex-hero > p,
body .ec-hero > p { color: rgba(255,255,255,.92); }
/* Le bouton principal bleu doit rester détaché d'un fond de la même teinte */
body .ec-hero .btn--primary { border-color: rgba(255,255,255,.8) !important; }
body .ex-hero .ex-intro-note:not(.ex-intro-note--ltr) { color: #fff; }
body .ex-hero .ex-switch a.active,
body .ex-hero .ex-correction-entry .btn:hover { color: color-mix(in srgb, var(--pc-ex, #4a6c8f) 60%, #000); }
body .ex-hero .exam-view-switch__opt.is-current { color: color-mix(in srgb, var(--pc-ex, #4a6c8f) 55%, #000) !important; }
