/* global.css - layout global Randothèque */

/* Base */
html, body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
}
.app {
  font-size: 16px;
  line-height: 1.5;
  color: #616161;
  background-color: #f5f5f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout général */
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: auto;
}

/* Header */
.layout-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background-color: #607d8b; /* primary */
  color: white;
}

/* Header top (logo + titre) */
.header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background-color: #e0e0e0; /* grey-300 */
}
.header-top img {
  max-height: 250px;
  height: auto;
  width: auto;
}


.title-text {
  font-size: 3em;
  color: black;
  text-align: center;
  word-wrap: break-word;    /* permet le retour à la ligne si nécessaire */
}

/* Responsive */
@media (max-width: 1200px) {
  .title-text {
    font-size: 2.2em;
  }
}
@media (max-width: 768px) {
  .title-text {
    font-size: 1.6em;
  }
}
@media (max-width: 480px) {
  .title-text {
    font-size: 1.2em;
  }
}


/* Navigation */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  background-color: lightslategrey;
}
.nav-tab {
  flex: 0 0 auto;
  margin: 5px 12px;
  padding: 5px 0;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1em;
  white-space: nowrap;
  transition: color 0.3s;
}
.nav-tab:hover,
.nav-tab:focus {
  color: #000;
}
.nav-tab.is-active {
  color: #000;
  font-weight: 600;
}

/* Main content */
.layout-content {
  flex: 1;
  padding: 2rem;
  background-color: #e0e0e0;
}

/* Footer */
.layout-footer {
  background-color: #455a64;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
}

/* Grilles et cellules */
.rando-grid {
  display: flex;
  flex-wrap: wrap;
}
.rando-grid > .cell {
  box-sizing: border-box;
  max-width: 100%;
}
.cell.image-cell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.image-wrapper {
  width: 520px;
  max-width: 100%;
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}
.image-wrapper img#list {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Responsive images */
@media (max-width: 1024px) {
  .image-wrapper { width: 420px; height: 300px; }
}
@media (max-width: 600px) {
  .image-wrapper { width: 100%; height: auto; aspect-ratio: 4/3; }
}

/* Login */
.login-card {
  width: 100%;
  max-width: 420px;
  background-color: #C7D0CC;
  border: 1px solid #bbb;
  border-radius: 6px;
  margin: 0 auto;
}
.login-card .title-text {
  text-align: center;
  font-size: 1.8em;
  margin: 0;
}
.login-card .input-field {
  width: 100%;
  max-width: 300px;
  margin: 10px auto;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Overlay et snackbar */
#overlay {
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 2;
  cursor: pointer;
}
#text {
  position: absolute;
  top: 65%;
  left: 50%;
  font-size: 18px;
  color: black;
  background-color: white;
  transform: translate(-50%,-50%);
}
#snackbar {
  visibility: hidden;
  min-width: 25%;
  margin-left: -125px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 2px;
  padding: 16px;
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: 30px;
  font-size: 17px;
}
#snackbar.show {
  visibility: visible;
  animation: fadein 0.5s, fadeout 0.5s 3.5s;
}
@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }

/* Responsive Header/Nav */
@media (max-width: 768px) {
  .nav-tabs { justify-content: flex-start; }
  .nav-tab { flex: 1 1 auto; }
}
