<!-- Question: est-ce qu'une entité est réutilisable ? Si oui, bloc -->

<!-- bloc search -->
<form class="search">
  
  <!-- bloc + element logo -->
  <img class="logo search__logo" src="https://placeimg.com/272/92/tech/sepia" width="272" height="92">
  
  <!-- bloc + element input -->
  <input type="text" class="input search__input">
  
  <!-- element buttons-wrapper -->
  <div class="search__buttons-wrapper">
    
    <!-- bloc + element button / modifier active -->
    <button type="button" class="button button__active search__button">Recherche BEM</button>
    
    <!-- bloc + element button -->
    <button type="button" class="button search__button">J'ai de la chance</button>
  </div>
</form>
@use postcss-nested;
@use postcss-cssnext;

:root {
  --gutter: 20px;
  
  --search-width: 540px;
  --search-height: 100vh;
  
  --input-height: 45px;
  
  --button-color: #757575;
  --button-background: #f2f2f2;
  --button-color-active: #222222;
  --button-background-active: #f8f8f8;
  --button-border-active: #c6c6c6;
}

.search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  
  width: var(--search-width);
  height: var(--search-height);
  
  margin: auto;
  padding: var(--gutter);
  
  font-family: system-ui;
  
  &__logo {
    margin: 0 auto var(--gutter);
  }
  
  &__input {
    border: 0;
    border-radius: 2px;
    
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.08);
  }
  
  &__buttons-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    
    margin-top: calc(var(--gutter) * 2);
  }
  
  &__button {
    margin: 0 calc(var(--gutter) / 4);
  }
}

.logo {
  display: block;
}

.input {
  font-size: 18px;
  
  min-height: var(--input-height);
  padding: 0 var(--gutter);
}

.button { 
  height: 35px;
  
  font-size: 13px;
  font-weight: bold;
  
  color: var(--button-color);
  background-color: var(--button-background);
 
  border: 1px solid transparent;
  border-radius: 2px;
  
  transition: all .15s ease-in-out;
  
  &__active, &:hover, &:active {
    color: var(--button-color-active);
    background-color: var(--button-background-active);
    
    border: 1px solid var(--button-border-active);
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  }
}

*:focus {
    outline: none;
}
View Compiled
Rerun