/*J'ai décidé de créer une deuxième page CSS pour recommencer depuis le debut la mise en page de la partie Back*/
/*je trouvais ça plus pratique comme la DA de la page admin est un peu différente du site de base*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
}

/*permet de highlight du texte avec le curseur. Je connaissais déjà cet élément, Update : ne fonctionne que sur Firefox*/
::selection {
    background: rgb(255, 223, 164);
    color: #101015;
}

/*Installer une font*/
@font-face {
    font-family: BlairITC;
    src: url(../../FONT/BlairITC/blair-itc-light.otf);
}


body {
    background-color: #DECBA1;
    font-family: 'BlairITC', sans-serif;
    overflow-x: hidden; /*bloque le faite de pouvoir aller sur les cotés*/
}


/* --------------------------- CSS DE LA PAGE ADMIN ---------------------- */

/* --- Page de Connexion --- */

.admin-login {
    overflow: hidden; /*permet que la page ne bouge pas*/
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    font-family: 'BlairITC', sans-serif;
}

.login-left {
    flex: 1;
    background-color: #DECBA1;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2em;
}

.login-logo {
    width: 150px;
    height: auto;
    margin-top: 1em;
}

.login-right {
    width: 50%;
    background-color: #faf4dc;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 3em 2em;
    overflow-y: auto;
    height: 100vh;
}

.login-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-align: center;
}

.login-form {
    width: 70%;
    display: flex;
    flex-direction: column;
}

.login-form label {
    font-size: 0.85rem;
    margin-bottom: 0.5em;
    margin-top: 1.2em;
    font-weight: bold;
}

.login-form input {
    border-radius: 15px;
    border: 3px solid #DECBA1;
    padding: 10px 20px;
    background-color: #f5f5f5;
    outline: none;
    font-size: 1em;
}

@media screen and (max-width: 768px) {
    .login-container {
      flex-direction: column;
      height: auto;
    }
  
    .login-left {
        width: 100%;
        background-color: #DECBA1;
        justify-content: flex-start;
        padding: 1em;
      }
      
    .login-left a {
        display: block;
    }
      
    .login-logo {
        width: 120px;
        height: auto;
    }
  
    .login-right {
      width: 100%;
      height: 100vh;
      padding: 2em;
      overflow-y: auto;
      justify-content: flex-start;
    }
  
    .login-form {
      width: 90%;
    }
  }
  

.login-button {
    width: 100%;
    margin-top: 2em;
    border-radius: 15px;
    border: none;
    padding: 12px;
    background-color: #DECBA1;
    color: #000;
    font-size: 1em;
    cursor: pointer;
    font-family: 'BlairITC', sans-serif;
    font-weight: bold;
}

.login-button:hover {
    background-color: #b2a078;
}

/* ----------- DASHBOARD ----------- */

body.admin-dashboard {
    background-color: #faf4dc;
    font-family: 'BlairITC', sans-serif;
    padding: 2em;
}

.dashboard-container {
    max-width: 100%;
    padding: 0 5%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2em;
}

.dashboard-header h1 {
    font-size: 2em;
    font-weight: bold;
}

.dashboard-buttons {
    display: flex;
    gap: 2em;
    align-items: center;
}

.action-button, .trash-button {
    background-color: #DECBA1;
    padding: 1em 2em;
    border: 2px solid #b2a078;
    border-radius: 15px;
    font-weight: bold;
    color: black;
    text-decoration: none;
    cursor: pointer;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

.trash-button {
    font-size: 1.2em;
    padding: 0.5em 0.9em;
}

.action-button:hover, .trash-button:hover {
    background-color: #b2a078;
}

.dashboard-search {
    gap: 0.5em;
    width: 500px;
    margin: 0;
}

.dashboard-search input {
    background-color: #f5f5f5;
    flex-grow: 1;
    padding: 10px 15px;
    border-radius: 10px;
    border: 3px solid #DECBA1;
    outline: none;
    margin-bottom: 2em;
}

.search-icon {
    padding: 10px 15px;
    border-radius: 10px;
    border: none;
    background-color: #DECBA1;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .dashboard-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1em;
    }
  
    .dashboard-buttons {
      flex-wrap: wrap;
      gap: 0.8em;
    }
  
    .dashboard-search {
      width: 100%;
    }
  }

.dashboard-section {
    margin-bottom: 2em;

}

.dashboard-section h2 {
    font-size: 1.2em;
    margin-top: 1.5em;
    margin-bottom: 1em;
}

.dashboard-section ul {
    list-style: none;
    padding: 0;
}

.dashboard-section li {
    background-color: white;
    padding: 0.8em 1em;
    margin-bottom: 0.5em;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 25px;
    border: 3px solid #DECBA1;
}

.arrow-button {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: black;
}

/* --------------------------- Pages MODIFIER / SUPPRIMER / AJOUTER / RECHERCHER ---------------------- */

.back-button {
    display: inline-block;
    background-color: #faf4dc;
    border: 3px solid #DECBA1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    text-align: center;
    line-height: 45px;
    font-weight: bold;
    color: #5b4e2e;
    text-decoration: none;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.modifier .login-right {
    padding: 2em;
    padding-bottom: 4em;
}

.login-form input,
.login-form textarea,
.login-form select {
    border-radius: 15px;
    border: 3px solid #DECBA1;
    padding: 10px 20px;
    background-color: #f5f5f5;
    outline: none;
    font-size: 1em;
    font-family: 'BlairITC', sans-serif;
    width: 100%;
    box-sizing: border-box;
}