html, body {
    height: auto;
    min-height: 100%;
}

body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    background-color: var(--deep-blue-50);
}

h1, h2, h3 {
  text-wrap: balance;
}

ul {
    margin-top: 1em;
}

li {
    margin: 0 0 0.5em 1em;
}

.corner{
  border-radius: 20px;
  display:block; 
  max-width:100%; 
  height:auto;
}

figure {
  margin: 2em 0;
  color: var(--une-legende);
}

figcaption {
  margin-top: 0.5em; 
  font-size: 0.8em;
}

.article-list a {
    text-decoration: none;
    transition: transform 0.3s;
}

.article-list a:visited {
    color: inherit;
}

#article-content {
    width: 80%;
    margin: 40px auto 0 auto;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#article-content p {
  margin-bottom: 1em;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    margin-bottom: 2.5em;
    transition: transform 0.3s ease;
}

.article-title-zone {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#article-content h1 {
    font-family: "Lilita One", sans-serif;
    font-size: 2.7em;
    color: var(--deep-blue-100);
    margin-bottom: 8px;
    font-weight: 800;
}

#article-content h2 {
    font-family: "Lilita One", sans-serif;
    font-size: 2em;
    color: var(--deep-blue-100);
    margin: 1.5em 0 0.7em 0;
    font-weight: 800;
}

.article-meta {
    font-size: 1em;
    color: var(--deep-blue-100);
    margin-bottom: 12px;
}

.article-chapo {
    margin-bottom: 20px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-tag {
    display: inline-block;
    background: var(--deep-blue-80);
    color: var(--gotham-noire);
    font-style: italic;
    font-size: 1em;
    border-radius: 999px;
    padding: 6px 18px;
}

.article-image img {
    width: 400px;
    object-fit: cover;
    aspect-ratio: 1/1;
    border-radius: 50px;
}

.article-intro {
    font-size: 1.15em;
    color: var(--deep-blue-100);
    font-weight: 400;
    margin-left: 15%;
    margin-right: 15%;
    margin-bottom: -2em;
}

.article-body {
    margin-left: 15%;
    margin-right: 15%;
}

.article-body a {
    color: #000dff;
    text-decoration: underline;
    font-weight: 500;
}

.article-intro a {
    color: var(--deep-blue-100);
    text-decoration: underline;
    font-weight: 500;
}

.article-list a:hover {
    transform: scale(1.01);
    transition: transform 0.3s;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.article-preview {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5em;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid white;
  padding-bottom: 1.5em;
}

.article-preview-content {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  justify-content: center;
  flex: 1;
}

.article-preview-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5em;
}

.article-preview-image {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 300px;
}

.article-preview-image img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 1.5em;
}

.article-preview-title-line {
  margin: 0;
  display: flex;
  align-items: center;
  flex: 1;
}

.article-preview-title-line h2 {
  margin: 0 !important;
  font-size: 1.2em;
}

.article-preview-infos {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

#mobile {
    display: none;
}

#footer {
  padding-bottom: 1em;
}

@media (max-width: 768px) {

    #mobile {
        display: block;
    }

    #desktop {
        display: none;
    }

    #article-content h1 {
        font-size: 2em;
    }

    #article-content h2 {
        font-size: 1.5em;
    }

    #article-content {
        width: 100%;
        padding: 20px 6vw;
        margin-top: 20px;
    }

    .article-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 1.5em;
    }

    .article-image img {
        width: 100%;
        height: auto;
        margin-top: 0.5em;
    }

    .article-intro {
        margin: -1.5em 0 -1em 0;
    }

    .article-body {
        margin-left: 0%;
        margin-right: 0%;
    }

    .article-preview {
      flex-direction: column;
      align-items: flex-start;
    }

    .article-preview.last-article {
      margin-bottom: 1em;
    }

    .article-preview-top {
      flex-direction: row;
      align-items: center;
    }

    .article-preview-content {
      margin-top: 0.5em;
      justify-content: flex-start;
    }

    .article-preview-image {
      height: 80px;
    }

    .article-preview-image img {
      width: 80px;
      height: 80px;
      margin-right: 0;
      border-radius: 12px;
    }

    .article-meta, .article-tag {
      font-size: 0.8em;
    }

    .article-tags {
      margin-top: -0.5em;
    }
}