@import url("variables.css");
@import url("../portfolio.css");
/**
 *  Section 0.
 *  Font face and reset
 *  C'est long et pénible à lire
 *  mais on  commence par ça
 **/

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.5;
}

ul {
  list-style-position: inside;
  list-style-type: none;
}

ul > li::marker {
  color: var(--accent-1);
  font-size: 1rem;
}

ul img,
video,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

main,
header {
  border: var(--accent-1) solid 0.5px;
}

/**
 *  Section 2.
 *  Typographie section
 */
body {
  font-family: var(--main-font);
  font-weight: 400;
  color: var(--main-font-color);
  background-color: var(--background-color);
}

h1 {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 32px;
  color: var(--accent-1);
  letter-spacing: 1px;
  font-size: 2.8rem;
}

h2 {
  font-size: 1.8rem;
  font-family: var(--title-font);
  font-weight: 900;
  color: var(--accent-1);
}

h3 {
  font-family: var(--main-font);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--main-font-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  padding: 0;
  line-height: 1;
}

.markdown-h2 {
  padding: 0 8px;
}

a {
  text-decoration: none;
  color: var(--accent-1);
}

a:hover {
  color: var(--accent-3);
}

.big-hero__link {
  font-family: var(--special-font);
  color: var(--accent-1);
  font-size: 1.8rem;
}

p {
  margin: 16px 0;
}

.emphasis {
  font-weight: 800;
  color: var(--accent-1);
  font-size: 1.2rem;
}
/**
 * Section 3.
 * Le, ou les, Layout
 * On commence toujours par la version mobile
 * et on modifie ce qu'il faut pour la version
 * desktop ou ultra wide
 */

.page-layout {
  background-color: var(--background-color);
  width: var(--main-col-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  min-height: 99dvh;
}

/** If text, then no image */
.page-layout__header {
  height: var(--header-height);
}

.page-layout__header--with-background {
  background-image: url("img/header-mobile.png"), url("img/header-default.png");
  background-repeat: no-repeat;
  background-size: contain;
}

.page-layout__header--text {
  background-image: none;
  text-transform: capitalize;
  font-family: var(--special-font);

  font-size: var(--header-text-size);
  font-weight: 400;
  line-height: 1;
  background-image: none;
  margin: 0;
  padding: 0;
  line-height: var(--header-top-line-height);
  margin-top: var(--header-top-margin-desktop);
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  flex: 2;
}

.page-layout__main {
  background-color: var(--background-color);
  flex: 6;
  padding: 12px;
}

.page-layout__nav {
  min-height: var(--nav-height);
}
.text-block {
  padding: 16px;
}

.page-layout__footer {
  height: var(--nav-height);
  flex: 1;
}


.footer-nav__list {
  display: flex;
  flex-direction: row;
  width: 95%;
  margin: auto;
  justify-content: space-between;
  height: 28px;
}

.footer-nav__item {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-family: var(--main-font);
  flex: 1
}

.centered-section {
  height: 80%;
  overflow: hidden;
  width: 75%;
  margin: 10% auto;
}


/** Ici on passe sur le layout desktop */
@media screen and (min-width: 800px) and (max-width: 1100px) {
  .page-layout__header--with-background {
    background-image: url("img/header-default.png");
    background-repeat: no-repeat;
  }
}

@media screen and (min-width: 1100px) {
  .page-layout__header--with-background {
    background-image:
      url("img/header-large.png"), url("img/header-default.png");
    background-repeat: no-repeat;
  }
}
/**
 *  Section 4.
 * Les images et medias
 **/

.image-viewer {
  margin-top: 16px;
  width: 100%;
}

.image-viewer__img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
/**
  * Section 5
  * Les listes, dont la navigation
  */
.article-ol {
  padding: 0 20px;
  margin-bottom: 20px;
}

.main-nav__list {
  display: flex;
  flex-direction: row;
  width: 95%;
  margin: auto;
  justify-content: space-between;
  height: 32px;
}

.main-nav__item {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--nav-item-size);
  font-family: var(--title-font);
  flex: 1
}

.nav__link--img {
  width: 100%;
  img {
    height: var(--nav-height);
  }
}
.nav__link--img:hover {
  filter: hue-rotate(40deg) saturate(100) brightness(0.8);
}

.eula-navigator {
  border-top: 1px solid #eae4ea;
  font-size: 10px;
  line-height: 16px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

@media screen and (min-width: 800px) {
  .main-nav__list {
    height: 48px;
    width: 100%;
    margin: auto;
  }

  .eula-navigator {
    flex-direction: row;
    font-size: 12px;
    line-height: 18px;
  }
}
/**
 *  Section 6 : Les formulaires
 **/

.blog-form {
  width: 100%;
  background-color: var(--accent-2-light);
  color: #333;
  display: flex;
  flex-direction: column;
  padding: 8px;
  box-sizing: border-box;

  gap: 8px;
}

.blog-form--information {
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
  display: block;
}

.blog-form__fieldset {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-form__line {
  display: flex;
  flex-direction: column;

  gap: 4px;
}

.blog-form__item {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
  align-items: center;
}

.blog-form__input {
  padding: 2px;
  font-size: 16px;
  flex: 1;
}

.blog-form__label {
  flex: 1;
  font-size: 16px;
}

.blog-form__label--required::after {
  content: "*";
}

.blog-form__label--long {
  flex: 10;
}

.blog-form__input--long {
  flex: 3;
}

.blog-form__textarea {
  min-height: 120px;
  resize: vertical;
  padding: 8px;
}

.blog-form__input:invalid {
  border-color: red;
  border-style: dotted;
  background-color: #ffe3e8;
}

.blog-form__input:user-invalid {
  border-color: red;
  border-style: dotted;
  background-color: #ffe3e8;
}

.blog-form__input:user-invalid:before {
  content: "!";
}
.blog-form__input--checkbox {
  height: 18px;
  border-radius: 0;
}

.blog-form__button {
  margin-top: 16px;
  border: 1px solid #333;
  border-radius: 0;
  background-color: var(--accent-2);
  height: 32px;
  color: var(--letter-color);
}

.blog-form__button:hover {
  filter: contrast(120%) brightness(103%);
  cursor: pointer;
}

.media-bloc,
.information-message {
  min-height: 120px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-color: #fdfdfe;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

.media-bloc__cover {
  flex-shrink: 0;
  flex: 1;
  overflow: hidden;
}

.media-bloc__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-bloc__info {
  padding: 8px;
  flex: 2;
}

.information-message {
  color: black;
}

.blog-form__message {
  padding: 16px;
  margin-top: 8px;
  border: 2px #333 dotted;
}

.blog-form__header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  height: 24px;
  margin-bottom: 8px;
  align-items: center;
}
.slide-down-enter-active {
  transition: all 0.4s ease-out;
}

.slide-down-enter-from {
  opacity: 0;
  transform: translateY(-12px);
}

.slide-down-enter-to {
  opacity: 1;
  transform: translateY(0);
}
.blog-form__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media screen and (min-width: 800px) {
  .blog-form,
  .media-bloc,
  .information-message {
    width: 90%;
    margin: 16px auto;
  }

  .blog-form {
    gap: 16px;
  }
  .blog-form__line {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
  }

  .blog-form__button {
    height: 48px;
    flex: 1;
  }

  .blog-form__label--long {
    flex: 10;
  }

  .blog-form__input--long {
    flex: 4;
  }

  .blog-form__input--checkbox {
    height: 24px;
    border-radius: 0;
  }
}

/**
 * Section 7: les bloc de comment
 **/
.comment-list {
  width: 100%;
  margin: 16px auto;
}

.comment-grid--inside-level {
  border-top: 1px solid var(--accent-2);
}

.comment-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: max-content;
  justify-items: stretch;
  align-items: stretch;
}

.comment-grid__item {
  font-size: 14px;
  padding: 8px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-grid__item--123 {
  grid-column: 1 / 3;
}
.comment-grid__item--45 {
  grid-column: 3 / 5;
}

.comment-grid__item--6 {
  grid-column: 5 / 7;
}

.comment-grid__item--123456 {
  grid-column: 1 / 7;
}

.comment-grid__item--23456 {
  grid-column: 1 / 7;
}

.comment-grid__reply {
  margin-left: 18px;
}

.comment-list__button {
  font-family: var(--main-font);
  line-height: 1;

  align-self: center;
  max-height: 24px;
  font-size: 8px;
  line-height: 2;
  margin-right: 4px;
  background-color: var(--accent-2);
  border: none;
  border-radius: 8px;
  padding: 0 8px;
}
.comment-list__button:hover {
  filter: contrast(120%) brightness(103%);
  cursor: pointer;
}

.comment-grid__date {
  font-size: 10px;
  font-weight: 400;
}

.comment-grid__content {
  background-color: var(--accent-2-light);
  min-height: 5rem;
  padding: 8px;
  border-top: 1px solid var(--accent-2);
  border-bottom: 1px solid var(--accent-2);
}

@media screen and (min-width: 800px) {
  .comment-list {
    width: 90%;
    margin: 16px auto;
  }

  .comment-list__button {
    align-self: center;
    max-height: 32px;
    font-size: 16px;
    line-height: auto;
    margin-right: 4px;
    background-color: var(--accent-2);
    border: none;
    border-radius: 8px;
    padding: 0 8px;
  }

  .comment-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: max-content;
  }

  .comment-grid__item {
    font-size: 14px;
  }

  .comment-grid__item--123 {
    grid-column: 1 / 4;
  }
  .comment-grid__item--45 {
    grid-column: 4 / 6;
  }

  .comment-grid__item--6 {
    grid-column: 6 / 7;
  }

  .comment-grid__item--123456 {
    grid-column: 1 / 7;
  }

  .comment-grid__item--23456 {
    grid-column: 2 / 7;
  }
  .comment-grid__author {
    font-size: inherit;
  }

  .comment-grid__content {
    background-color: var(--accent-2-light);
    min-height: 5rem;
    padding: 4px 8px;
    border: 1px solid var(--accent-2);
  }
}

/**
 * Section 8: les listes de liens
 **/

.link-list {
  font-size: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px;
}

.link-list__item {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

@media screen and (min-width: 800px) {
  .link-list {
    font-size: 24px;
  }
}

/**
 * Section 9: les cards d'images et de media etc
 */
.media-card {
  display: flex;
  width: 100%;
  align-items: center;
  border: 1px solid var(--main-font-color);

  height: 48px;
  gap: 16px;
}

.media-card__img {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-card__text {
  flex: 5;
}
.media-card__stubb {
  background-color: var(--accent-2);
}

.comic-card {
  width: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--accent-1);
  overflow: hidden;
}
.comic-card__header {
  height: 80px;
  border: 1px solid var(--accent-1);
  overflow: hidden;
  width: 100%;
  text-align: left;
  padding: 8px;
  font-size: 16px;
  line-height: 1.2;
}
.comic-card--name {
  flex: none;
  text-transform: capitalize;
  font-family: var(--main-font);
  font-size: 32px;
  font-weight: 200;
  padding: 8px;
}

.comic-card--figure {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.comic-card--img {
  flex: 4;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  object-position: center;
}

.comic-card--description {
  flex: 5;
  min-height: 0;
  font-family: var(--main-font);
  font-size: 16px;
  line-height: 1.35;
  padding: 16px 4px;
  overflow: hidden;
}

.comic-card--button {
  flex: none;
  height: 48px;
  font-size: 36px;
  border-top: 1px solid var(--accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--title-font);
  background-color: var(--accent-1);
  color: var(--background-color);
}

.comic-card--button:hover {
  background-color: var(--accent-3);
  color: var(--background-color);
}

/**
 * Le bloc d'article
 */

.article-bloc {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-bloc__header {
  min-height: var(--nav-height);
}

.article-bloc__title {
  margin-top: 1rem;
  font-family: var(--special-font);
  line-height: 1;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--main-font-color);
  color: var(--main-font-color);
}

.article-bloc__title a {
  color: var(--main-font-color);
}

.article-navigator {
  margin: 8px 0;
  font-size: 18px;
  height: var(--nav-height);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0 16px;
  align-items: center;
}

@media screen and (min-width: 800px) {
  .article-navigator {
    font-size: 24px;
  }
  .article-bloc__header {
    padding: 0px;
  }

  .article-bloc__title {
    margin-top: 1rem;
    font-family: var(--special-font);
    line-height: 1;
    font-size: 84px;
    font-weight: 800;
    letter-spacing: 0.03em;
  }

  .comic-card {
    width: 100%;
    height: 420px;
  }

  .comic-card--img {
    flex: 10;
  }
}

/**
 * Section 10:  les bloc de code
 */

pre {
  font-family: "Courier New", Courier, monospace;
  max-width: 90%;
  margin: 1rem auto;
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid #333;
  padding: 1em;
  overflow-x: scroll;
}

.large {
  width: 100%;
  max-width: 100%;
}

/**
 * Section 11 : Les tables
 */

table {
  border: 2px solid var(--main-font-color);
  border-collapse: collapse;
  margin: 8px;
}

thead {
  border-bottom: 2px solid var(--main-font-color);
}

tr {
  border: 1px solid var(--main-font-color);
  height: 32px;
}

th,
td {
  padding: 0 8px;
  text-align: center;
}

/**
 *  Section 12 : modal
 */
.modal {
  height: 96vh;
  width: 96vw;
  position: fixed;
  inset: 0;
  margin: auto;
  border: 1px solid var(--accent-1);

  padding: 32px 24px;
}

.modal[open] {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.modal::backdrop {
  backdrop-filter: blur(10px);
}

.modal-ol {
  list-style: outside decimal;
  padding: 24px 24px 24px 40px;
}

.modal-ol__item::marker {
  color: var(--accent-1);
  font-family: var(--title-font);
  font-size: 1.8rem;
  font-weight: 900;
}
.modal-ol__item {
  margin-bottom: 24px;
}
.modal-ol__item:last-child {
  margin-bottom: 0;
}
.modal-ol__item-title {
  font-size: 22px;
  padding: 0;
  line-height: 1.2;
}
.modal-ol__item-p {
  line-height: 1.3;
}

.modal__close {
  align-self: center;
  padding: 12px 32px;
  border: 1px solid var(--accent-1);
  border-radius: 999px;
  font-family: var(--title-font);
  font-size: 20px;
  background-color: var(--accent-1);
  color: var(--background-color);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.modal__close:hover {
  background-color: var(--background-color);
  color: var(--accent-1);
}

@media screen and (min-width: 800px) {
  .modal {
    height: 64vh;
    width: 72vw;
  }
}

/**
 *  Section utils
 */
.actionLink {
  cursor: pointer;
}

.actionLink:hover {
  filter: hue-rotate(180deg);
}
