/* IMPORTS DES DIFFÉRENTS ÉLÉMENTS */
@import "header.css";
@import "footer.css";
@import "tile.css";

/* STYLES BASIQUES */
.horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
}

/* BALISES STANDARDS */
body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    background-color: #f6f6f6;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    color: #333;
}

main {
    display: flex;
    flex-direction: column;
    min-height: 80vh;
    padding: 1em;
    width: 85%;
    height: 100%;
    background-color: white;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.text-block {
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.text-block p{
    text-align: justify;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table, th, td {
    border: 1px solid #ddd;
}

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

th {
    background-color: #f4f4f4;
}

article {
    --img-scale: 1.001;
    --title-color: black;
    --link-icon-translate: -20px;
    --link-icon-opacity: 0;
    position: relative;
    border-radius: 16px;
    box-shadow: none;
    background: #bababa;
    transform-origin: center;
    transition: all 0.4s ease-in-out;
    overflow: hidden;
}
  /**/
article a::after {
    position: absolute;
    inset-block: 0;
    inset-inline: 0;
    cursor: pointer;
    content: "";
}
  
/* basic article elements styling */
article h4 {
    margin: 0 0 18px 0;
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    color: var(--title-color);
    transition: color 0.3s ease-out;
}
  /**/
figure {
    margin: 0;
    padding: 0;
    max-width: 350px;
    max-height: 350px;
    aspect-ratio: auto;
    overflow: hidden;
}
  /**/
article img {
    max-width: 95%;
    transform-origin: center;
    transform: scale(var(--img-scale));
    transition: transform 0.4s ease-in-out;
}
  /**/
.article-body {
    padding: 24px;
}
  
article a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #28666e;
}
  /**/
article a:focus {
    outline: 1px dotted #28666e;
}
  /**/
article a .icon {
    min-width: 24px;
    width: 24px;
    height: 24px;
    margin-left: 5px;
    transform: translateX(var(--link-icon-translate));
    opacity: var(--link-icon-opacity);
    transition: all 0.3s;
}
  
/* using the has() relational pseudo selector to update our custom properties */
article:has(:hover, :focus) {
    --img-scale: 1.1;
    --title-color: #28666e;
    --link-icon-translate: 0;
    --link-icon-opacity: 1;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}
  
  
/************************ 
Generic layout (demo looks)
**************************/
  
  /*,
  *::before,
  *::after {
    box-sizing: border-box;
}*/
  
.articles {
    display: grid;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: auto;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
  /**/
@container card (min-width: 380px) {
    .article-wrapper {
      display: grid;
      grid-template-columns: 100px 1fr;
      gap: 16px;
    }
    .article-body {
      padding-left: 0;
    }
    figure {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }
    figure img {
      height: 100%;
      aspect-ratio: 1;
      object-fit: cover;
    }
}/**/
  
.sr-only:not(:focus):not(:active) {
    clip: rect(0 0 0 0); 
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap; 
    width: 1px;
}/**/

.responsive {
    width: 100%;
    max-width: 800px;
    height: auto;
  }

@media screen and (max-width: 500px) {
    main {
        width: 100%;
    }

    .container {
        margin-right: 1em;
        margin-left: 1em;
    }
}