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

* {
  transition:
    color 0.1s ease,
    border-color 0.1s ease,
    background-color 0.1s ease,
    transform 0.1s ease;
}

/*
a:hover {
  transform: rotate(-6deg);
}
*/

/* =========================
   base
========================= */

:root {
  --main-color: #222;
  --background-color: #f8f6f1;
  --accent-color: rgb(46, 163, 0);

  --rotate: rotate(-6deg);

  --border: 1px solid var(--main-color);

  --text: clamp(20px, 2vw, 24px);
  --text-md: clamp(22px, 2vw, 28px);
  --text-sm: clamp(18px, 2vw, 18px);

  --titre: clamp(40px, 6vw, 50px);
  --h3: clamp(22px, 4vw, 28px);
  --menutext: clamp(22px, 2vw, 28px);

  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 48px;
}

/* regular */
@font-face {
  font-family: "TexGyreHeros";
  src: url("/fonts/texgyreheroscn-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

/* italique */
@font-face {
  font-family: "TexGyreHeros";
  src: url("/fonts/texgyreheroscn-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
}

/* gras */
@font-face {
  font-family: "TexGyreHeros";
  src: url("/fonts/texgyreheroscn-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

/* gras italique */
@font-face {
  font-family: "TexGyreHeros";
  src: url("/fonts/texgyreheroscn-bolditalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
}

/* =========================
   structure
========================= */

html,
body {
  width: 100%;
  height: 100%;
  padding: 0;
}

body {
  font-family:"TexGyreHeros", sans-serif; 
  font-size: var(--text);

  color: var(--main-color);
  background-color: var(--background-color);
}

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

a:hover,
.menu a:focus {
  color: var(--accent-color);
}

img {
  background-color: var(--background-color);
}

/* =========================
   layout
========================= */

.layout {
  display: grid;
  grid-template-columns: 28vw 1fr 28vw;
  min-height: 100vh;
  padding: 2vw 2vw 0 2vw;
}

/* =========================
   titre
========================= */

.title {
  font-size: var(--titre);
  font-weight: normal;
  margin-bottom: var(--space-sm);
  cursor: pointer;
}

.title:hover {
  transform: var(--rotate);
}

/* =========================
   sidebar menu
========================= */

.sidebar {
  width: fit-content;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.menu {
  display: flex;
  flex-direction: column;
  flex-wrap: none;
}

.menu a {
  display: block;
  width: fit-content;
  margin-bottom: 6px;
  font-size: var(--menutext);
  cursor: pointer;


}

.menu a:hover {
  background-color: var(--background-color);
  color: var(--accent-color);
  transform: var(--rotate);
}

/* =========================
   recherche
========================= */

.search {
  position: relative;
  margin-left: auto;
}

#search-wrapper {
  position: relative;
}

#search {
  width: 150px;
  margin-top: 32px;
  border: var(--border);
  outline: none;
  font-family: inherit;
  font-size: var(--text);
  border-radius: 10px;
  padding: 6px 14px;
}

#search:focus {
  outline: none;
  box-shadow: none;
  border: var(--border);
}

#results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  display: none;
  overflow-y: auto;

  width: 200px;
  max-height: 300px;
  margin-top: var(--space-xs);
  padding: var(--space-xs);

  background: white;
  border: var(--border);

  z-index: 9999;
}

#results a {
  font-size: var(--text);
  text-transform: lowercase;
}

/* =========================
   content
========================= */

.content {
  display: flex;
  flex-direction: column;
  flex: 1;

  width: 600px;
  max-width: 100%;
  min-height: 0;

  margin: 0 auto;
  padding-top: var(--space-md);
}

.content h1 {
  font-size: clamp(30px, 2.5vw, 40px);
  font-weight: normal;
  margin-bottom: var(--space-md);
  text-transform: lowercase;
}

.summary {
  margin-bottom: var(--space-lg);
  font-size: var(--text-md);
  font-style: italic;
  opacity: 0.5;
}

/* =========================
   texte articles
========================= */

.text {
  margin-bottom: var(--space-lg);
}

.text h2,
.text h3,
.list h3 {
  font-size: var(--h3);
}

.text h2,
.text h3 {
  margin-bottom: var(--space-sm);
}

.text p,
.text a {
  font-size: var(--text);
}

.text p {
  margin-bottom: var(--space-sm);
  text-align: justify;
  text-justify: inter-word;
}

.text li {
  list-style-position: inside;
  list-style-type: circle;
}

.text hr {
  margin: var(--space-md);
}

.text img,
.list-image,
.artist-image,
.album-cover img {
  border: var(--border);
  background-color: var(--background-color);
}

.text img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;

  margin: 0 auto 20px auto;
}

/* =========================
   liste
========================= */

.tags-menu {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  text-transform: lowercase;
}

.tags-menu a {
  opacity: 50%;
}

.tags-menu a:hover {
  opacity: 100%;
  transform: var(--rotate);
}

.list {
  flex: 1;
}

.list p {
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  text-align: justify;
  text-justify: inter-word;
}

.list li {
  width: 100%;
  margin-bottom: var(--space-xs);
  list-style-type: none;
}

.list h3 {
  width: 100%;
  margin-bottom: var(--space-xs);

  font-weight: normal;
  border-bottom: var(--border);
}

.list-image-summary {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}


.list-summary {
  font-size: var(--text-sm);
  font-style: italic;
  opacity: 0.5;
}

.list-image {
  height: 200px;
  min-width: auto;
}

.list-image:hover {
  border: 1px solid var(--accent-color);
}

/* artistes & album */

.list-artistes {
    display: flex;
  align-items: center;
  gap: var(--space-md);
}

.list-artistes-side {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* =========================
   accueil recent
========================= */

.recent-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.recent-content h3 {
  font-weight: normal;
  border-bottom: var(--border);
}

.recent-label {
  font-weight: bold;
}

.recent-album img {
  max-width: 200px;
  border: var(--border);
}

.recent-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xs);
  margin: var(--space-md) 0;
}

.recent-more {
  opacity: 50%;
}


/* =========================
   artist profil
========================= */

.artiste-profil {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md)
}

.artiste-image {
  width: 200px;
  height: auto;
  max-width: 33vw;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: var(--border);
}

.artiste-bio {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.artiste-bio-link {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-md);
  max-width: 100%;

}

.artiste-bio-link a {
  padding: 6px 14px;
  border: var(--border);
  font-size: var(--text-sm);
  min-width: fit-content;
  border-radius: 10px;
  background-color: white;
}

.artiste-bio-link a:hover {
  border: 1px solid var(--accent-color);
  transform: var(--rotate);
}

/* =========================
   pagination
========================= */

.pagination {
  display: flex;
  gap: 2rem;

  margin-top: auto;
  margin-bottom: var(--space-md);
}

.pagination {
  justify-content: center;
}

.pagination a {
  min-width: fit-content;
  background-color: var(--background-color);
}

.pagination a {
  padding: 8px 14px 4px 14px;
}

.pagination a.active {
  font-style: italic;
  border-bottom: var(--border);
}

/* =========================
   album
========================= */

.album-block {
  display: flex;
  margin-top: 10vh;
  margin-bottom: 5vh;
  justify-content: center;
}

.album-cover img {
  width: 400px;
  height: 400px;
  object-fit: cover;

  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
}

.album-info {
  flex: 1;
  min-width: 250px;
  margin-left: 30px;
}

.album {
  font-size: clamp(20px, 2vw, 20px);
}

.year {
  margin-bottom: 2rem;
  font-size: var(--text-sm);
  opacity: 50%;
}

.tracklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tracklist li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.track,
.duration,
.total {
  font-size: clamp(16px, 2vw, 18px);
}

.duration {
  margin-left: 2rem;
}

.total {
  margin-top: 3rem;
}

.download a {
  font-size: clamp(12px, 2vw, 14px);
  opacity: 0.5;
}

.download a:hover {
  opacity: 1;
  transform: scale(1.05);
}

.album-description {
  margin-bottom: 16px;

  font-size: var(--text-sm);
  text-align: justify;
  text-justify: inter-word;
}



/* =========================
   links
========================= */

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);;

  max-width: 100%;

  margin-top: 10px;
  margin-bottom: 80px;
  margin-left: 3px;


}

.links a {
  padding: 6px 14px;
  min-width: fit-content;
  background-color: white;

  border-radius: 10px;

  border: var(--border);

  font-size: var(--text-sm);
}

.links a:hover {
  border: 1px solid var(--accent-color);
  transform: var(--rotate);
}

/* =========================
   footer
========================= */

.footer {
  display: flex;
  justify-content: space-between;

  margin-top: auto;
  padding: 10px;

  font-size: var(--text-md);

  border-top: var(--border);
}

/* =========================
   plus petit écran
========================= */

@media (max-width: 1200px) {

  .layout {
    grid-template-columns: 24vw 1fr 24vw;
  }

  .album-block {
    flex-direction: column;
    align-items: center;
    margin-top: 5vh;
  }

  .album-cover {
    margin-bottom: var(--space-md);
  }

  .album-description {
    width: 100%;
  }
}

/* =========================
   mobile
========================= */

@media (max-width: 1000px) {

  .layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }

  .title, .search {
    margin-bottom: var(--space-sm);
    display: flex;
    justify-content: center;
  }

  .sidebar {
    width: 100%;
    padding-bottom: var(--space-xs);
     padding: var(--space-sm);
  }

  #search {
    margin-top: 16px;
  }

  .menu {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2vw;

    overflow-x: auto;
    overflow-y: hidden;

    white-space: nowrap;

    padding-bottom: 6px;
  }

  .menu a {
    display: inline-block;
    margin-bottom: 0;
  }

  .content {
    display: flex;
    flex-direction: column;
    flex: 1;

    height: auto;

    padding: 6vw;
    padding-top: 0;
  }

  .text p {
    width: auto;
    text-justify: inter-word;
  }

  .images {
    max-height: 300px;
  }

  .list-image {
    max-height: 150px;
  }

  .album-block {
    margin-top: 0;
  }

  .album-cover img {
    width: 300px;
    height: 300px;
  }
}