/*Vars*/
:root {
  color-scheme: light dark;
  --rad: .7rem;
  --dur: .3s;
  --color-dark: #2f2f2f;
  --color-light: #fff;
  --color-brand: #57bd84;
  --font-fam: 'Lato', sans-serif;
  --btn-width: 20%;
  --bez: cubic-bezier(0, 0, 0.43, 1.49);
}


body{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: light-dark(antiquewhite, #1D1616);
  color: light-dark(#2f2f2f, #EEEEEE);
  gap: 30px;
}


section{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90%;
}

article, h1, a, h2, :has( > #Temperature){
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  text-align: center;
  flex-basis: auto;
  flex-wrap: wrap;
}



#SearchBar{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  align-content: center;
  flex-wrap: wrap;
  width: 90%;
  position : sticky ;
  max-width: 700px;

}



article img{
  display: flex;
  width: 90%;
  height: fit-content;
  align-content: center;

}


article h1{
  text-decoration-line: underline;
  font-size: 250%;
  width: 70%;
  
}
#Meteo h2, #Meteo h1, :has(> #Temperature), :has(> #Pluie), :has(> #Precipitation), :has(> #Population){
  width: 80%;
}

#Meteo p{
  margin: 3% 5%;
}

:has( > #Temperature){
  font-size: 175%;
}

article{
  gap: 10px
}

#Meteo, body > section:last-of-type {
  display: none;
}

/* Main styles*/
form {
  position: relative;
  width: 20rem;
  background: var(--color-brand);
  border-radius: var(--rad);
  text-align: start ;
}
input, button {
  height: 30px;
  font-family: var(--font-fam);
  border: 0;
  color: var(--color-dark);
  font-size: 1rem;

}
input[type="Search"] {
  outline: 0; /* <-- shold probably remove this for better accessibility, adding for demo aesthetics for now.*/
  width: 100%;
  background: var(--color-light);
  padding: 0 1.6rem;
  border-radius: var(--rad);
  appearance: none; /*for iOS input[type="Search"] roundedness issue. border-radius alone doesn't work*/
  transition: all var(--dur) var(--bez);
  transition-property: width, border-radius;
  z-index: 1;
  position: relative;
}
button {
  display: none; /* prevent being able to tab to it*/
  position: absolute;
  top: 0;
  right: 0;
  width: var(--btn-width);
  font-weight: bold;
  background: var(--color-brand);
  border-radius: 0 var(--rad) var(--rad) 0;
}
input:not(:placeholder-shown) {
  border-radius: var(--rad) 0 0 var(--rad);
  width: calc(100% - var(--btn-width));
  + button {
    display: block;
  }
}
label {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0;
  border: 0;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

#Auteur {
  font-size: 0.85rem;
  color: #999;
  margin: 2rem 0;
}

#Auteur a {
  display: inline;
  color: #aaa;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 0.2s ease, border-bottom 0.2s ease;
}

#Auteur a:hover {
  color: #ddd;
  border-bottom: 1px dashed #555;
}

