@import url("https://fonts.googleapis.com/css2?family=Berkshire+Swash&display=swap");

/**
🎄 Theme Noël UniCA 🎄
Pour appliquer ce theme à votre cours Moodle,
configurez le bloc "UI Custom CSS" avec :
- CSS Stylesheet URL : https://lms.univ-cotedazur.fr/styles/christmas_theme.css
- Afficher sur les types de page : Toutes les pages
**/

#page-my-index {
  --unica-red: #e52222;
  --unica-snow: #e0f7fa;
  --unica-green: #0c8228;
}

/* Table des matiÃ¨res */
#page-my-index .open-nav .fa-list {
  --fa: "\f79c";

  color: gold;
  text-shadow: 0 0 6px rgb(0 0 0);
}

/* Icone de cadeau dans la table des matiÃ¨res */
#page-my-index .courseindex .courseindex-item.pageitem .courseindex-link::after {
  font: var(--fa-font-solid);
  content: "\f2dc";
  margin-right: 1.5em;
  color: var(--unica-snow);
}

/* Icone de cadeau pour les achÃ¨vement d'activitÃ©s dans la tdm */
#page-my-index .courseindex .courseindex-item .completioninfo .fa-circle {
  --fa: "\f06b";
}

/* Snowy background */
#page-my-index {
  background-image: url("https://lms.univ-cotedazur.fr/img/snowy-background.webp");
  background-size: cover;
  background-color: #a6bec6;
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Christmas icons */
#page-my-index h1::before,
#page-my-index h3::before {
  font: var(--fa-font-solid);
  margin-right: 0.5em;
}

/* Traineau rouge */
#page-my-index h1::before {
  content: "\f7cc";
  color: var(--unica-red);
}

/* Sapin vert */
#page-my-index h3::before {
  content: "\f1bb";
  color: var(--unica-green);
}

/** Format Tuiles **/

#page-my-index .format-tiles h2::before,
#page-my-index .format-tiles h3::before {
  content: "\f1bb" !important;
  font: var(--fa-font-solid);
  margin-right: 0.5em;
}

#page-my-index .format-tiles h2::before {
  color: var(--unica-green) !important;
}

#page-my-index .format-tiles h3::before {
  color: #FFF !important;
}

#page-my-index .activity:not(.subtile) {
  border-top: 1px solid var(--unica-green);
}

#page-my-index #page-header .w-100 {
  border-bottom: 1px solid var(--unica-red);
  margin-bottom: .5em;
}

#page-my-index .fa-university {
  --fa: "\f7d0";
}

#page-my-index .fa-book {
  --fa: "\f7c9";
}

#page-my-index .fa-graduation-cap {
  --fa: "\f7ce";
}

#page-my-index .fa-life-ring {
  --fa: "\f7d2";
}

/* Sucre dâ€™orge */
#page-my-index .format_onetopic-tabs .nav-link.active::before {
  content: "\f786";
  font: var(--fa-font-solid);
  color: var(--unica-red);
}

/* Christmas Font */
#page-my-index h1,
#page-my-index h2,
#page-my-index a[data-uca="accueil"] {
  font-family: "Berkshire Swash", serif;
  font-weight: 400;
  font-style: normal;
}

#page-my-index .navbar.bg-primary[data-bs-theme="dark"] {
  background-image: url("https://lms.univ-cotedazur.fr/img/christmas_lights.svg");
  background-size: 60px;
}

#page-my-index .navbar.bg-body a[data-uca="accueil"] {
  color: gold;
  font-size: 1.2em;
}

/* LÃ©gÃ¨re ombre */
#page-my-index .navbar .nav-link,
#page-my-index .navbar-brand {
  text-shadow: 1px 1px 3px rgb(0 0 0 / 40%);
}

/* NEIGE SUR BOUTONS */
#page-my-index .btn-primary,
#page-my-index .btn-secondary,
#page-my-index .nav-link.active,
#page-my-index div.form-submit,
#page-my-index .icons-collapse-expand:not(.courseindex-chevron),
#page-my-index .multi_section_tiles {
  position: relative;
}

#page-my-index .btn-secondary::before,
#page-my-index .btn-primary:not([href^="mailto"])::before,
#page-my-index .alert::after,
#page-my-index a.btn-primary[href^="mailto"]::after,
#page-my-index .nav-link.active::after,
#page-my-index div.form-submit::after,
#page-my-index .icons-collapse-expand::after,
#page-my-index .tilestyle-1:not(#abovetiles)::after,
#page-my-index .tilestyle-2:not(#abovetiles)::after {
  --overflow-x: 4px;
  --snow-image: url("../img/snow-cap2.webp");

  content: "";
  position: absolute;
  top: -6px;
  left: calc(var(--overflow-x) * -1);
  border-image-source: var(--snow-image);
  border-image-slice: calc(6 * 56 / 20) fill;
  border-image-width: calc(28px / 3);
  border-image-repeat: round;
  width: calc(100% + var(--overflow-x) * 2);
  height: 28px;
  filter: drop-shadow(0 2px 1px rgb(0 0 0 / 25%));
  opacity: 1;
  animation: fade-in 2s;
  pointer-events: none;
}

#page-my-index .nav-link.active {
  --overflow-x: 4px;
  padding-left: var(--overflow-x);
}

#page-my-index .tilestyle-1:not(#abovetiles)::after,
#page-my-index .tilestyle-2:not(#abovetiles)::after {
  --overflow-x: 1px;

  top: -12px;
}

/* Frosted background */

#page-my-index .badge,
#page-my-index .btn-primary,
#page-my-index .btn-secondary,
#page-my-index .block-add {
  background-image: radial-gradient(circle, transparent 70%, var(--unica-snow) 100%);
}

#page-my-index .badge {
  --bs-badge-padding-x: 1.5em;
}

#page-my-index .btn-primary, #page-my-index .btn-secondary {
  border-color: #e9eafa;
}


#page-my-index .learningmap-place.learningmap-reachable {
  cursor: pointer;
  transition: all ease-in 300ms;
}

#page-my-index #learningmap-render-container-26019 .learningmap-place.learningmap-reachable:hover {
  fill: gold !important;
  stroke: rgb(28 192 184);
}


/* Christmas Theme end */


/* Annonce du calendrier de l'Avent 2026 */
#page-my-index .unica_noel_annonce {
  position: relative; overflow: hidden; border-radius: 18px;
  padding: 30px; background: #173c2b;
  box-shadow: inset 0 0 0 1px #c5a460;
}
#page-my-index .unica_noel_annonce > :is(.noel_bt,.noel_bb,.noel_bl,.noel_br) {
  position: absolute; pointer-events: none;
}
#page-my-index .unica_noel_annonce > :is(.noel_bt,.noel_bb) {
  height: 30px; left: 0; right: 0; background-size: 120px 30px;
  background-repeat: repeat-x; background-image: url("../img/noel_friseH.svg");
}
#page-my-index .unica_noel_annonce > :is(.noel_bl,.noel_br) {
  width: 30px; top: 30px; bottom: 30px; background-size: 30px 120px;
  background-repeat: repeat-y; background-image: url("../img/noel_friseV.svg");
}
#page-my-index .unica_noel_annonce > .noel_bt { top: 0; }
#page-my-index .unica_noel_annonce > .noel_bb { bottom: 0; }
#page-my-index .unica_noel_annonce > .noel_bl { left: 0; }
#page-my-index .unica_noel_annonce > .noel_br { right: 0; }
#page-my-index .unica_noel_annonce > :is(.noel_bt,.noel_bb)::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 15px 15px,#fff0b2 0 2px,#c5a460 3px 7px,transparent 8px),radial-gradient(circle at calc(100% - 15px) 15px,#fff0b2 0 2px,#c5a460 3px 7px,transparent 8px);
}
#page-my-index .unica_noel_annonce .noel_content {
  position: relative; padding: 24px; border-radius: 7px;
  box-shadow: 0 0 0 1px #c5a460; color: #1f2430;
  background: linear-gradient(rgba(255,255,255,.91),rgba(255,255,255,.96)),url("https://lms.univ-cotedazur.fr/img/snowy-background.webp") center/cover;
}
#page-my-index .unica_noel_annonce .noel_h_title { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
#page-my-index .unica_noel_annonce .noel_boule_content { position: relative; flex-shrink: 0; transform-origin: 50% -20px; }
#page-my-index .unica_noel_annonce .noel_boule_fil { position: absolute; top: -24px; left: 50%; width: 3px; height: 24px; transform: translateX(-50%); background: linear-gradient(90deg,#92713a,#f4d994,#92713a); }
#page-my-index .unica_noel_annonce .noel_boule { position: relative; width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 2rem; background: radial-gradient(ellipse at 28% 20%,#fff8f5 0%,#e66c7b 20%,#b20026 48%,#750019 85%); box-shadow: inset -5px -8px 15px #65001955,0 7px 15px #0003; }
#page-my-index .unica_noel_annonce .noel_boule::before { content: ""; position: absolute; top: -7px; left: 50%; transform: translateX(-50%); width: 20px; height: 10px; border-radius: 3px 3px 1px 1px; background: repeating-linear-gradient(90deg,#a17a37 0 2px,#e8cb83 2px 4px); }
#page-my-index .unica_noel_annonce .noel_title_conteneur { min-width: 0; }
#page-my-index .unica_noel_annonce .noel_title_conteneur h3 { font-family: "Berkshire Swash", Georgia, serif; font-weight: 400; color: #173c2b; font-size: clamp(1.35rem,3vw,1.9rem); margin: 0 0 6px; }
#page-my-index .unica_noel_annonce .noel_title_conteneur h3::before { content: none; }
#page-my-index .unica_noel_annonce .noel_subtitle { color: #a51c30; font-weight: 600; margin: 0; }
#page-my-index .unica_noel_annonce .noel_visuel { margin-bottom: 18px; padding: 6px; border: 1px solid #c5a460; border-radius: 9px; background: #fff; text-align: center; }
#page-my-index .unica_noel_annonce .noel_visuel img { border-radius: 5px; }
#page-my-index .unica_noel_annonce .noel_desc { font-size: 1rem; text-align: center; }
#page-my-index .unica_noel_annonce .btn-primary { --bs-btn-bg: #a51c30; --bs-btn-border-color: #a51c30; --bs-btn-hover-bg: #801426; --bs-btn-hover-border-color: #801426; --bs-btn-active-bg: #70101f; --bs-btn-active-border-color: #70101f; color: #fff; white-space: normal; }
@keyframes unica_noel_annonce_swing { 0% { transform: rotate(-5deg); } 35% { transform: rotate(3deg); } 70% { transform: rotate(-1deg); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: no-preference) { #page-my-index .unica_noel_annonce .noel_boule_content { animation: unica_noel_annonce_swing 1s ease-out both; } }
@media (max-width: 575.98px) {
  #page-my-index .unica_noel_annonce { padding: 20px; }
  #page-my-index .unica_noel_annonce > :is(.noel_bt,.noel_bb) { height: 20px; background-size: 80px 20px; }
  #page-my-index .unica_noel_annonce > :is(.noel_bl,.noel_br) { width: 20px; top: 20px; bottom: 20px; background-size: 20px 80px; }
  #page-my-index .unica_noel_annonce > :is(.noel_bt,.noel_bb)::before { display: none; }
  #page-my-index .unica_noel_annonce .noel_content { padding: 16px 12px; }
  #page-my-index .unica_noel_annonce .noel_h_title { gap: 12px; }
  #page-my-index .unica_noel_annonce .noel_boule { width: 48px; height: 48px; font-size: 1.3rem; }
  #page-my-index .unica_noel_annonce .noel_boule_fil { top: -16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) { #page-my-index .unica_noel_annonce .btn-primary::before { animation: none; } }


/* V1.2.1 - Largeur de la visite guidee de Noel uniquement */
#page-my-index :is([data-role="tour-step"], .modal-dialog, .popover):has(.unica_noel_annonce) {
  width: min(1000px, calc(100vw - 32px)) !important;
  max-width: min(1000px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
}
#page-my-index [data-role="tour-step"]:has(.unica_noel_annonce) :is(.modal-dialog, .popover, .modal-content, .popover-body),
#page-my-index :is(.modal-dialog, .popover):has(.unica_noel_annonce) :is(.modal-content, .modal-body, .popover-body) {
  max-width: 100%;
  min-width: 0;
}

/* V1.2.3 - Focus du conteneur Flexitour de Noel uniquement */
#page-my-index [data-flexitour="container"]:has(.unica_noel_annonce):focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* V1.3 - Trois actions de Noel et infobulles de l'annonce */
#page-my-index .unica_noel_annonce .noel_intro { margin: 0 0 18px; color: #173c2b; }
#page-my-index .unica_noel_annonce .noel_actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
#page-my-index .unica_noel_annonce .noel_action { position: relative; display: flex; flex-direction: column; min-width: 0; }
#page-my-index .unica_noel_annonce .noel_action_btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; flex: 1; min-height: 76px; padding: 12px 6px;
  font-weight: 600; line-height: 1.25; text-align: center;
}
#page-my-index .unica_noel_annonce .noel_action_btn i { font-size: 1.4rem; }
#page-my-index .unica_noel_annonce .noel_action_or {
  --bs-btn-bg: #d4af37; --bs-btn-border-color: #b28c25;
  --bs-btn-hover-bg: #e2bf50; --bs-btn-hover-border-color: #b28c25;
  --bs-btn-active-bg: #c39b2c; --bs-btn-active-border-color: #a37d20;
  --bs-btn-color: #382b0c; --bs-btn-hover-color: #382b0c; --bs-btn-active-color: #382b0c;
  color: #382b0c;
}
#page-my-index .unica_noel_annonce .noel_action_or:is(:hover,:focus,:active) { color: #382b0c; }
#page-my-index .unica_noel_annonce .noel_action_vert {
  --bs-btn-bg: #185b35; --bs-btn-border-color: #185b35;
  --bs-btn-hover-bg: #124629; --bs-btn-hover-border-color: #124629;
  --bs-btn-active-bg: #103c24; --bs-btn-active-border-color: #103c24;
}
#page-my-index .unica_noel_annonce .noel_action_btn:focus-visible { outline: 3px solid #947020; outline-offset: 3px; }
#page-my-index .unica_noel_annonce .noel_action_info {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  width: 210px; max-width: 100%; padding: 10px; border: 1px solid #c5a460;
  border-radius: 8px; background: #173c2b; color: #fff; font-size: .88rem;
  line-height: 1.4; text-align: center; z-index: 20;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
#page-my-index .unica_noel_annonce .noel_action:is(:hover,:focus-within) .noel_action_info { opacity: 1; }
#page-my-index .unica_noel_annonce .noel_voeux { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid #c5a460; color: #173c2b; text-align: center; font-style: italic; }
@media (max-width: 575.98px), (hover: none), (pointer: coarse) {
  #page-my-index .unica_noel_annonce .noel_action_info { position: static; transform: none; width: auto; max-width: none; opacity: 1; margin-top: 8px; background: transparent; color: #173c2b; border: 0; padding: 4px; }
}
@media (max-width: 575.98px) {
  #page-my-index .unica_noel_annonce .noel_actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { #page-my-index .unica_noel_annonce .noel_action_info { transition: none; } }
