/* ---------------------------------------- global */

html {
  scroll-behavior: smooth;
  color-scheme: only light;
}

@media screen and (max-width: 768px) {
  html {
    font-size: 80%;
  }
}

body {
  font-family: Roboto, sans-serif;
  font-weight: 300;
  font-size: 10px;
  --bulma-body-font-size: 10px;
  --bulma-strong-weight: 400;
}

/* ---------------------------------------- corrections Bulma */

p:not(:last-child) {
  margin-bottom: revert;
}

.bulma-is-transparent {
  background-color: transparent;
}

.timeline {
  display: flex;
  flex-direction: column;
  font-size: smaller;
}

.timeline .timeline-item::before {
  content: "";
  background-color: #dbdbdb;
  display: block;
  width: 1px;
  height: 100%;
  position: absolute;
  left: -.5px;
  top: 0;
}

.has-text-centered .timeline-content {
  text-align: initial;
}

.timeline-heading {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 1px;
  margin-bottom: 0.25rem !important;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------------------------------------- extensions Bulma */

.has-text-cm-orange {
  color: var(--cm-color-orange) !important;
}

.has-text-cm-bleu {
  color: var(--cm-color-bleu) !important;
}

.has-text-cm-violet {
  color: var(--cm-color-violet) !important;
}

.has-text-cm-rose {
  color: var(--cm-color-rose) !important;
}

.has-title-cm-violet .bulma-title {
  color: var(--cm-color-violet) !important;
}

.has-title-cm-rose .bulma-title {
  color: var(--cm-color-rose) !important;
}

.has-background-cm-orange {
  background-color: var(--cm-color-orange) !important;
}

.has-background-cm-transparent {
  background-color: transparent !important;
}

.has-background-dark {
  background-color: var(--cm-color-bleunuit) !important;
}

/* ---------------------------------------- spinner */

@keyframes cm-spinner {
  to {
    transform: rotate(360deg);
  }
}

.cm-spinner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0.8;
}
.cm-spinner::after {
  content: '';
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border-radius: 50%;
  border: 2px solid #ccc;
  border-top-color: #000;
  animation: cm-spinner .6s linear infinite;
  z-index: 1000;
  overflow: hidden;
}

.cm-spinner {
  display: block;
  /*background: white;*/
  filter: opacity(0.5);
  pointer-events: all;
  cursor: progress;
}

/* ---------------------------------------- back to top */

a.back-to-top {
  position: fixed;
  z-index: 999;
  right: 2rem;
  bottom: 2rem;
  font-size: 4rem;
  opacity: 0;
  transition: opacity 0.5s;
}

a.back-to-top:hover {
  opacity: 1;
}

a.back-to-top:focus {
  outline: none;
}

/* ---------------------------------------- overlay */

overlay {
  height: 100%;
  width: 100%;
  padding: 0;
  display: none;
  position: fixed;
  z-index: 1001;
  top: 0;
  left: 0;
  background-color: rgba(0,0,0,0.85);
}

/* ---------------------------------------- sidebar > bloc pour l'édition de contenu */

aside.layout-sidebar-first {
  transform: translateX(10%);
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow-y: auto;
  padding-right: 10px;
  position: fixed;
  right: calc(100% - 2px);
  bottom: 0;
  transition-duration: var(--bulma-duration);
  transition-property: transform;
  width: calc(16rem + 2px);
  z-index: 10;
}

aside.layout-sidebar-first:hover {
  transform: translateX(90%);
}

aside.layout-sidebar-first nav.tabs {
  background-color: #00ffcc80;
}

aside.layout-sidebar-first ul.tabs.primary {
  display: flex;
  flex-direction: column;
  font-weight: var(--bulma-weight-medium);
  overflow: hidden;
  padding-left: 1.25rem;
  transition-duration: var(--bulma-duration);
  transition-property: max-height;
  align-items: start;
}

/* ---------------------------------------- page d'édition du layout builder */

#layout-builder.layout-builder--content-preview-disabled .bulma-container.cm-has-css-anim {
  position: relative;
}

/* ---------------------------------------- identité du site */

header {
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

header .region-header {
  background-image: url('/themes/custom/boregar_starter/images/headers/lvl-ciel.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position-y: 42%;
}

header .region-header .bulma-navbar {
  height: 100%;
  align-items: end;
}

.block.block-system-branding-block.bulma-block {
  margin-bottom: unset;
}

.site-logo {
  font-size: 0;
}

.site-logo img {
  max-height: 7rem;
}

.bulma-navbar-menu {
  font-family: Bellota, serif;
  font-weight: bold;
}

@media screen and (max-width: 1023px) {
  .bulma-navbar-menu {
    background-color: var(--cm-color-violet);
  }
}

.bulma-navbar-dropdown {
  --bulma-navbar-dropdown-border-style: none;
}

a.bulma-navbar-item:hover,
.bulma-navbar-item a.bulma-navbar-link:hover {
  color: var(--cm-color-orange) !important;
}

.bulma-navbar-dropdown .bulma-navbar-item:hover {
  color: var(--cm-color-bleu) !important;
}

.bulma-breadcrumb {
  font-family: Bellota, serif;
  font-weight: bold;
}

/* ---------------------------------------- section Bulma hero */

.bulma-section.bulma-hero {
  height: min(70vw, 60rem);
  background-size: cover;
  background-position-y: 96%;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  min-height: 24rem;
}

article.node--type-article .bulma-section.bulma-hero {
  height: max-content;
  min-height: 20vw;
  background-position-y: center;
}

.cm-title-prefix {
  text-align: center;
  color: var(--cm-color-orange);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
}

body:not(.path-admin) .bulma-section.bulma-hero .bulma-title.bulma-is-1 {
  position: absolute;
  top: 0;
  left: 0;
  max-width: unset;
  background-color: #ffffffaa;
  /*background-image: linear-gradient(white, #ffffffa0);*/
  font-size: 4rem;
}

body.path-admin .bulma-section.bulma-hero .bulma-title.bulma-is-1 {
  position: relative;
}

.bulma-section.bulma-hero .bulma-title.bulma-is-1 .field--name-title {
  display: block;
  margin-top: 4rem;
  margin-bottom: -0.9rem;
}

@media screen and (max-width: 1024px) {
  .bulma-section.bulma-hero .bulma-title.bulma-is-1 {
    font-size: 3rem;
  }
  .bulma-section.bulma-hero .bulma-title.bulma-is-1 .field--name-title {
    margin-bottom: -0.7rem;
  }
}

/* ---------------------------------------- animation stars */

.bulma-section.cm-has-css-anim {
  position: relative;
  overflow: hidden;
  min-height: 24rem;
}

.bulma-container.cm-has-css-anim {
  background: transparent;
  position: absolute;
  width: 100vw;
  max-width: unset !important;
  top: 0;
  left: 0;
  height: 100%;
}

.bulma-container.cm-has-css-anim .contextual {
  right: 4rem;
}

svg.cm-star {
  stroke: #7ceaa4;
  position: absolute;
  left: -10vw;
  transform-style: preserve-3d;
}

svg.cm-star:nth-child(1) {
  bottom: calc(50%);
  animation: cm-star1 9s cubic-bezier(0,0,0,1) infinite;
  animation-delay: 0s;
  height: 9rem;
  z-index: 6;
  /*filter: opacity(0.5);*/
}
@keyframes cm-star1 {
  to {
    left: 110vw;
    bottom: calc(100% - 2rem);
    transform: scale(0.04) rotate(123deg);
  }
}

svg.cm-star:nth-child(2) {
  bottom: calc(70%);
  animation: cm-star2 5s cubic-bezier(0,0,0,1) infinite;
  animation-delay: 1.5s;
  height: 5rem;
  z-index: 5;
  /*filter: opacity(0.5);*/
}
@keyframes cm-star2 {
  to {
    left: 110vw;
    bottom: calc(100% - 1rem);
    transform: scale(0.04) rotate(238deg);
  }
}

svg.cm-star:nth-child(3) {
  bottom: calc(20%);
  animation: cm-star2 7s cubic-bezier(0,0,0,1) infinite;
  animation-delay: 3s;
  height: 7rem;
  z-index: 5;
  /*filter: opacity(0.5);*/
}
@keyframes cm-star3 {
  to {
    left: 110vw;
    bottom: calc(100% - 2rem);
    transform: scale(0.04) rotate(345deg);
  }
}

/* ---------------------------------------- section divider */

.bulma-section.cm-has-divider {
  height: min(20vw, 32rem);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.bulma-section.cm-has-divider-1 {
  background-image: url('/themes/custom/boregar_starter/images/dividers/lvl-div-1.jpg');
}
.bulma-section.cm-has-divider-2 {
  background-image: url('/themes/custom/boregar_starter/images/dividers/lvl-div-2.jpg');
}
.bulma-section.cm-has-divider-3 {
  background-image: url('/themes/custom/boregar_starter/images/dividers/lvl-div-3.jpg');
}
.bulma-section.cm-has-divider-4 {
  background-image: url('/themes/custom/boregar_starter/images/dividers/lvl-div-4.jpg');
}
.bulma-section.cm-has-divider-5 {
  background-image: url('/themes/custom/boregar_starter/images/dividers/lvl-div-5.jpg');
}
.bulma-section.cm-has-divider-footer {
  background-image: url('/themes/custom/boregar_starter/images/dividers/lvl-div-footer.jpg');
  margin-top: 4rem;
}

/* ---------------------------------------- contenu > bloc > voir plus */

.cm-button-more .bulma-icon {
  transition: transform 0.12s ease-in 0s;
}

.cm-button-more .bulma-icon.is-active {
  transform: rotate(90deg);
  transform-origin: 50% 50%;
}

.field--name-field-body-more {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: 0.2s;
  column-count: 3;
  text-align: left;
  font-size: smaller;
}

.field--name-field-body-more.is-active {
  max-height: 1000rem;
  opacity: 1;
}

.field--name-field-body-more .bulma-title,
.field--name-field-body-more p,
.field--name-field-body-more ul {
  padding-bottom: 0.8rem !important;
  margin-bottom: 0;
}

.field--name-field-body-more ul {
  list-style-type: initial;
  list-style-position: inside;
}

.field--name-field-body-more figure {
  margin: 0.8rem auto;
}

.field--name-field-body-more figure:hover {
  cursor: zoom-in;
}

.field--name-field-body-more figcaption {
  font-size: smaller;
  text-align: center;
  font-style: italic;
}

.field--name-field-body-more article.align-center .field--name-field-media-image {
  text-align: center;
}

@media screen and (max-width: 56em) {
  .field--name-field-body-more {
    column-count: 2;
  }
}

@media screen and (max-width: 40em) {
  .field--name-field-body-more {
    column-count: 1;
  }
}

/* ---------------------------------------- contenu > bloc > galerie flickity */

.cm-flk-block.flickity-enabled {
  margin: 2rem 0 4rem 0;
}

.cm-flk-block .field__item {
  margin-right: 1rem;
  padding-top: 1rem;
}

.cm-flk-block .field__item img {
  transition: 0.2s;
  border-radius: 0.25rem;
}

.cm-flk-block .field__item:hover img {
  transform: scale(1.05);
}

/* ---------------------------------------- contenu > atomium */

.cm-d3-link {
  stroke: #000;
  stroke-width: 1px;
}

.cm-d3-node {
  cursor: move;
}

.cm-d3-node .cm-d3-circle {
  stroke: #000;
  stroke-width: 1px;
}

.cm-d3-node.cm-d3-fixed .cm-d3-circle {
  stroke: #f00;
}

/* ---------------------------------------- contenu > calendrier */

.cm-calendar header {
  display: flex;
  align-items: center;
  font-size: calc(16px + (26 - 16) * ((100vw - 300px) / (1600 - 300)));
  justify-content: center;
  margin-bottom: 2em;
  min-height: 10vh;
  text-align: center;
}

.cm-calendar ul, .cm-calendar ol {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-gap: 1em;
  margin: 0 auto;
  max-width: 64em;
  padding: 0;
}

.cm-calendar li {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  margin-left: 0;
  font-size: calc(16px + (21 - 16) * ((100vw - 300px) / (1600 - 300)));
}

.cm-calendar ul.weekdays {
  margin-bottom: 1em;
}

.cm-calendar ul.weekdays li {
  height: 4vw;
}

.cm-calendar ol.day-grid li {
  background-color: #eaeaea;
  border: 1px solid #eaeaea;
  height: 12vw;
  max-height: 125px;
}

.cm-calendar ul.weekdays abbr[title] {
  border: none;
  font-weight: 500;
  text-decoration: none;
}

.cm-calendar ol.day-grid li:nth-child(1),
.cm-calendar ol.day-grid li:nth-child(2),
.cm-calendar ol.day-grid li:nth-child(3),
.cm-calendar ol.day-grid li:nth-child(37),
.cm-calendar ol.day-grid li:nth-child(38),
.cm-calendar ol.day-grid li:nth-child(39),
.cm-calendar ol.day-grid li:nth-child(40),
.cm-calendar ol.day-grid li:nth-child(41),
.cm-calendar ol.day-grid li:nth-child(42) {
  background-color: #fff;
}

@media all and (max-width: 800px) {
  .cm-calendar ul, .cm-calendar ol {
    grid-gap: .25em;
  }

  .cm-calendar ul.weekdays li {
    font-size: 0;
  }

  .cm-calendar ul.weekdays > li abbr:after {
    content: attr(title);
    font-size: calc(16px + (26 - 16) * ((100vw - 300px) / (1600 - 300)));
    text-align: center;
  }
}

/* ---------------------------------------- contenu > documents / médias */

.view-lvl-tags .bulma-panel-block .bulma-tag {
  cursor: pointer;
  border: 1px solid white;
}

.view-lvl-tags .bulma-panel-block .bulma-tag:hover {
  cursor: pointer;
  border: 1px solid var(--cm-color-bleuclair);
}

.view-lvl-tags .bulma-panel-block .bulma-tag.is-active {
  color: white;
  background-color: var(--cm-color-bleuclair);
}

.view-lvl-documents .bulma-panel-tabs a.bulma-is-active span,
.view-lvl-medias .bulma-panel-tabs a.bulma-is-active span {
  font-weight: 500;
}

.view-lvl-medias .cm-iso-block {
  max-width: calc(100% - 32px);
  margin: auto;
  padding: 1rem 0;
}

.cm-iso-sizer-50 {
  width: 50%;
}

.cm-iso-sizer-30 {
  width: 30%;
}

.cm-iso-sizer-33 {
  width: 33%;
}

.cm-iso-img {
  overflow: hidden;
}

.cm-iso-img a {
  display: grid;
  grid-template-columns: 1fr;
}

.cm-iso-img a img {
  grid-row: 1;
  grid-column: 1;
  transition: 0.2s;
  margin: 4px;
  border-radius: 2px;
}

.cm-iso-img a span {
  grid-row: 1;
  grid-column: 1;
  opacity: 0;
  z-index: 1;
  place-self: center;
  color: white;
  padding: 0.5rem;
}

.cm-iso-img:hover img {
  filter: sepia(0.2) saturate(0.7) brightness(0.5);
  z-index: 1;
}

.cm-iso-img:hover span {
  opacity: 1;
}

.cm-iso-sizer-auto {
  width: 160px;
}
.cm-iso-img-iso_1x1 {
  width: 160px;
  height: 160px;
}
.cm-iso-img-iso_1x2 {
  width: 160px;
  height: 320px;
}
.cm-iso-img-iso_2x1 {
  width: 320px;
  height: 160px;
}
.cm-iso-img-iso_2x2 {
  width: 320px;
  height: 320px;
}

/* ---------------------------------------- blog */

/*
.cm-blog-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
*/
.cm-blog-block .bulma-card {
  overflow: hidden;
  margin-bottom: 0;
  width: 48%;
  margin: 1%;
}

.cm-blog-block .bulma-card-image img {
  width: 100%;
}

@media screen and (max-width: 40em) {
  .cm-blog-block .bulma-card {
    width: 100%;
  }
  .cm-iso-sizer-50 {
    width: 100%;
  }
}

/* ---------------------------------------- article */

.cm-dates {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.cm-date {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, auto);
  width: 8rem;
  background-color: white;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
  border-radius: var(--bulma-radius);
}

.cm-date-F {
  border-radius: var(--bulma-radius) var(--bulma-radius) 0 0;
}

.cm-date-hm {
  border-radius: 0 0 var(--bulma-radius) var(--bulma-radius);
}

.cm-date-sep {
  color: white;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
}

/* ---------------------------------------- footer */

footer {
  --bulma-link-text: var(--cm-color-bleuclair);
  font-family: Bellota;
  font-weight: 400;
}

footer ul.menu a.is-active {
  color: var(--cm-color-orange);
  font-weight: bold;
}

.bulma-column.cm-is-narrow-centered div,
.bulma-column.cm-is-narrow-centered ul {
  width: fit-content;
  margin: auto;
}
