/* ======================================
   FONT
====================================== */
/* Regular */
@font-face {
  font-family: "Libre Baskerville";
  src: url("assets/LibreBaskerville-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Italic */
@font-face {
  font-family: "Libre Baskerville italic";
  src: url("assets/LibreBaskerville-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}


html, body {
  margin: 0;
  padding: 0;
  font-family: "Libre Baskerville", serif;
  height: 100%;
  overflow: hidden; /* empêche le scroll global */
}

a,
a:visited,
a:hover,
a:active {
  color: inherit !important;      /* reprend la couleur du parent */
  text-decoration: none !important;
  -webkit-text-fill-color: inherit; /* fix iOS */
}

span,
p,
div {
  color: inherit;
}

* {
  -webkit-text-fill-color: initial;
}


/* ======================================
   GRID PRINCIPALE (1 + 2 + 2 colonnes)
====================================== */
body {
  display: grid;
  grid-template-columns: 20% 40% 40%;
  height: 100vh;
  color: black;
}

.text-col {
  padding: 30px 30px 200px 30px;
}

#imgA.text-col{
  border-right: 1px solid black;
}

.text-col p {
  font-family: "Libre Baskerville italic", serif;
  font-style: italic;
  font-size: 39px;
  line-height: 1.6;
  margin: 0;
}


/* ======================================
   SIDEBAR (colonne 1)
====================================== */
#left {
  box-sizing: border-box;
  overflow-y: auto;
  padding: 10px 10px 10px 10px;
  border-right: 1px solid black;
  display: flex;
  flex-direction: column;
  justify-content: space-between;


}

#header {
  display: flex;
  height: 100%;
  margin-bottom: 10px;
  border: 1px solid black;
  padding: 10px;
  border-radius: 5px;
}

.header-inner{
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

#logo-btn {
  border: 0px solid black;
  border-radius: 5px;
  background: none;
  padding: 5px 12px;
  cursor: pointer;
}
#logo-btn img { height: 2vw; }

.top-menu {
  margin-top: 15px;
  width: 100%;
  
}


.menu-btn {
  font-family: "Libre Baskerville", serif;
  font-size: 12px;
  width: calc(100% - 10px) ;
  padding: 5px 10px;
  margin: 5px;
  cursor: pointer;
  border: 1px solid #333;
  border-radius: 5px;
  background-color: #FFFFFF;
  transition: 0.2s;
}



/* ======================================
   FILTER BLOCKS
====================================== */
.box {
  border: 1px solid black;
  border-radius: 5px;
  padding: 5px;
}

.box-title {
  font-family: "Libre Baskerville italic", serif;
  font-style: italic;
  font-weight: normal;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: center;
}

#filters-and-buttons{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filters-block {
  padding: 5px;
}

.filter-group{
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  border: 1px solid black;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

button,
input[type="button"],
input[type="submit"] {
  -webkit-appearance: none;  /* supprime le style iOS */
  -moz-appearance: none;     /* supprime style Firefox */
  appearance: none;           /* style standard */
  
  -webkit-tap-highlight-color: transparent; /* empêche le bleu lors du tap */
  -webkit-text-fill-color: inherit;         /* assure la couleur correcte sur iOS */
  
  background: #FFFFFF;        /* ton fond de bouton */
  color: #000;                /* texte noir (ou couleur souhaitée) */
  border: 1px solid #333;
  border-radius: 5px;
  padding: 5px 10px;
  margin: 5px;
  font-family: "Libre Baskerville", serif;
  font-size: 12px;
  font-weight: normal;
  cursor: pointer;
}

.filters-block button,
#actions-box button {
  padding: 5px 10px;
  margin: 5px;
  cursor: pointer;
  border: 1px solid #333;
  border-radius: 5px;
  background-color: #FFFFFF;
  transition: 0.2s;
  font-family: "Libre Baskerville", serif;
  font-size: 12px;
  font-weight: normal;
}

.filters-block button.active {
  background-color: black;
  color: white;
}

button:hover {
  background-color: #DDDDDD;
  color: black;
}


/* ======================================
   BOUTONS CLEAR + RANDOM
====================================== */
#actions-box button {
  margin-right: 10px;
  width: calc(100% - 10px);
}

#actions-box button:hover {
  background-color: #DDDDDD;
  color: black;
}



/* ======================================
   COLONNES IMAGES (col 2 + col 3)
====================================== */
#gallery-area {
  display: grid;
  grid-template-columns: 50% 50%; /* imgA | imgB */
  grid-column: 2 / 4; /* occupe les colonnes 2,3 et 4,5 combinées */
  height: 100vh;
  overflow: hidden;
}

.gallery-col {
  overflow-y: scroll;
  scrollbar-width: none;
}

.gallery-col img {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
}


/* ======================================
   MOBILE (single column)
====================================== */
@media (max-width: 900px) {
  body {
    display: block;
    height: 100vh;
    overflow: hidden;
  }
  
  .text-col p {
    font-style: italic;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
  }

  .text-col {
  padding: 30px 30px 200px 30px;
}
  
  /* Sidebar invisible */
  #left {
    display: block;
  }
  
  /* Header mobile fixe en haut - SORT DE LA GRID */
  #header {
    display: flex !important;
    position: fixed;
    width: 100%;
    height: 60px;
    background: white;
    z-index: 1002;
    top: 0;
    left: 0;
    border: none;
    border-bottom: 1px solid black;
    border-radius: 0;
    box-sizing: border-box;
  }
  
  .header-inner {
    border-radius: 5px;
    padding: 10px;
    width: calc(100% - 20px);
    border: 1px solid black;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  #logo-btn {
    padding: 5px;
  }
  
  #logo-btn img {
    height: 20px;
  }
  
  /* Burger menu */
  .burger-container {
    cursor: pointer;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
  }
  
  .burger-btn {
    width: 20px;
    height: 1px;
    background-color: black;
    transition: 0.3s;
  }

  /* Transformations pour la croix */
.burger-container.active .burger-btn:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.burger-container.active .burger-btn:nth-child(2) {
  opacity: 0;
}

.burger-container.active .burger-btn:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

  
  /* Top menu overlay (caché par défaut) */
  .top-menu {
    display: none !important;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 70px;
    background: white;
    border: 1px solid black;
    border-radius: 5px;
    padding: 10px;
    width: calc(100% - 45px);
    margin: 0;
  }
  
  .top-menu.show {
    display: flex !important;
    flex-direction: column;
  }
  
  /* Gallery area mobile - occupe tout l'espace */
  #gallery-area {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 60px);
    display: grid;
    grid-template-columns: 50% 50%;
    overflow: hidden;
  }
  
  .gallery-col {
    overflow-y: scroll;
  }
  
  /* Filters button fixe en bas */
  #mobile-filters-btn {
    width: calc(100% - 20px);
    bottom: 5px;
    left: 5px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: fixed;
    background: white;
    z-index: 1000;
    padding: 5px;
    box-sizing: border-box;
    border: 1px solid black;
    border-radius: 5px;
    cursor: pointer;
    font-family: "Libre Baskerville", serif;
    font-size: 12px;
    font-weight: normal;
  }
  
  .toggle-icon {
    position: fixed;
    right: 20px;
    font-size: 16px;
    font-weight: normal;
    line-height: 1;
  }
  
  /* Filters overlay */
  #filters-and-buttons {
    display: none !important;
    position: fixed;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid black;
    border-radius: 5px;
    padding: 10px;
    z-index: 1001;
    max-height: 100vh;
    overflow-y: auto;
    width: calc(100% - 45px);
  }
  
  #filters-and-buttons.show {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }
  
  /* random overlay */
  .gallery #filters-and-buttons {
    display: block !important;
    bottom: 5px;
    border: none;
    padding: 0;
    background-color: transparent;
    width: calc(100% - 10px);
  }
  
  .gallery .box {
    padding: 0;
    border: none;
  }
  
  .gallery button {
    background-color: white;
  }
}

/* Desktop - cacher les éléments mobiles */
@media (min-width: 901px) {
  #mobile-filters-btn {
    display: none !important;
  }
  
  .burger-container {
    display: none !important;
  }
}



