/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.1.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

/* @import url('https://fonts.googleapis.com/css2?family=Cardo:ital,wght@0,400;0,700;1,400&display=swap'); */

html {
  color: #222;
  font-size: 1em;
  font-family: "Cardo", serif;
  font-weight: 400;
  font-style: normal;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

body.no_scroll {
  overflow: hidden;
}

.mobile_only {
  display: none;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  height: 100px;
  z-index: 5;
}

.main_header {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 20px;
  border-bottom: 1px solid black;
  background: #DF2935;
  z-index: 5;
}

header .logo {
  display: flex;
  flex-direction: center;
  justify-content: center;
  align-items: center;
}

header .logo img {
  height: 100px;
  width: 160px;
  object-fit: cover;
}

header .title {
  display: flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  z-index: -1;
}

header .title img {
  display: none;
  height: 100%;
}

header h1 {
  margin: 0;
  color: white;
}

header .contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 24px;
  border-left: 1px solid black;
  padding: 0 20px;
  width: 160px;
  cursor: pointer;
  transition: all .3s ease-in-out;
  position: relative;
  color: white;
  background: #DF2935;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

header .contact.active {
  color: #713A6C;
}

header .contact .email {
  position: absolute;
  top: 0;
  right: 0;
  width: fit-content;
  padding: 10px 16px;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
  text-align: center;
  font-size: 1rem;
  transition: all .3s ease-in-out;
  height: 100%;
  display: flex;
  align-items: center;
  color: white;
  background: #713A6C;
  z-index: -1;
}

header .contact .email.shown {
  opacity: 1;
  right: calc(100% + 1px);
  pointer-events: all;
}

/* MAIN */

main {
  width: 100%;
  min-height: calc(100vh - 100px);
  display: flex;
  margin-top: 100px;
}

nav {
  position: relative;
  min-width: 280px;
  background: #274690;
  color: white;
  padding: 30px;
}

nav .sticky_container {
  position: sticky;
  top: 130px;
  display: flex;
  flex-direction: column;
  text-align: center;
}

nav img {
  width: 200px;
  margin: 0 auto 20px;
  outline: double;
  outline-color: silver;
  outline-width: 8px;
  cursor: pointer;
}

nav a {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

nav a.active {
  color: silver;
}

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 24px;
}

.main img {
  cursor: pointer;
}

.cadre {
  max-height: calc(100vh - 150px);
  width: fit-content;
  margin: 0 auto 24px;
}

.contact_link {
  margin-top: 0;
  font-size: 1.2rem;
}

/* Content pages */

.content .return {
  font-size: .8rem;
  color: black;
  width: fit-content;
  align-self: flex-start;
  margin-left: 12px;
}

.content h2 {
  font-size: 30px;
  color: black;
  width: 100%;
  text-align: center;
}

.content .text {
  width: 100%;
  text-align: center;
}

.content .content_wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 24px;
  gap: 24px 12px;
}

.content_wrapper .image {
  width: 400px;
  height: 500px;
}

.content_wrapper .image.primary {
  width: 100%;
}

.image a {
  display: block;
  margin-top: 5px;
  width: 100%;
  text-align: center;
}

.image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .3s ease-in-out;
}

body.loading .content_wrapper img {
  opacity: 0;
}

.zoom_container {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, .6);
  padding: 20px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease-in-out;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.zoom_container.active {
  opacity: 1;
  pointer-events: all;
}

.zoom_container img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Specific images */

.presentation_img {
    width: 500px;
    margin-bottom: 40px;
}

/* RESPONSIVE */

@media only screen and (max-width: 768px) {
  .mobile_only {
    display: flex;
  }

  header {
    height: 110px;
  }

  .main_header {
    height: 80px;
    padding: 10px;
  }

  .main_header .contact {
    display: none;
  }

  .main_header .title {
    width: 100%;
    justify-content: center;
    font-size: 1.3em;
  }

  header .logo img {
    height: 100%;
    width: 100px;
  }

  header h1 {
    font-size: 1.1em;
    text-align: center;
    padding: 0 8px;
  }

  header .contact .email {
    font-size: 1.1rem;
  }

  .discover {
    transition: all .3s ease-in-out;
  }

  .discover.active {
    color: #274690;
  }

  header .contact .email.shown {
    right: 0;
    top: 100%;
  }

  .subheader {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
    background: #DF2935;
  }
  
  .subheader div {
    width: 50%;
    height: 100%; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    text-align: center;
  }

  main {
    margin-top: 110px;
    padding: 20px 0 0 0;
    min-height: calc(100vh - 110px);
  }

  main.home {
    padding: 20px;
  }

  main nav {
    position: fixed;
    min-width: 280px;
    max-width: 280px;
    top: 110px;
    height: calc(100vh - 110px);
    left: -80vw;
    transition: left .3s ease-in-out;
  }

  .sticky_container {
    position: static;
  }

  main nav.shown {
    left: 0;
  }

  .main {
    padding: 0;
  }

  .category {
    margin-bottom: 0;
  }

  .cadre {
    width: 100%;
    margin-bottom: 24px;
  }

  .main .image {
    width: 100%;
    height: auto;
  }

  .content_wrapper .image.half {
    width: calc(50% - 6px);
  }

  .contact_link {
    margin-top: 0;
    text-align: center;
  }

  .zoom_container {
    padding: 0;
  }

  .presentation_img {
    width: calc(100% - 48px);
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .sr-only class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: " ";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
   * Printing Tables:
   * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
   */
  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

