@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root{
  --color-primary: #d34336;
  --color-blue100: #0f3250;
  --color-blue25: #add5de;
  --color-blue5:#e4f5f9;
  --color-red-primary: #A80D2C;
  --color-red-secondary: #EE4543;
  --color-creme50: #fbfaf5;
}

html, body{
  height: 100%;
}

body {
  background-color: var(--color-creme50);
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  overflow-x: hidden;

  .background-wave{
    position: absolute;
    top: 260px;
    width: 146%;
    height: auto;
    z-index: -1;
    left: -170px;

    @media screen and (min-width: 768px) {
      bottom: -50px;
      right: -110px;
      left: unset;
      top: unset;
      width: 400px;
      height: auto;
      position: fixed;
    }
  }

  .account-settings-container {
    display: flex;
    width:85%;
    background-color: var(--color-blue5);
    padding: 1rem 1rem;
    border-radius: 20px;
    align-self: center;
    @media screen and (min-width: 768px) {
      width: 100%;
      max-width: 1200px;
      img{
        margin: 2rem;
      }
    }
  }

  .settings-btn {
    color: var(--color-primary);
    align-self: center;
    width: 100%;
    text-align: left;
    padding: 0;
  }

  .settings-btn:hover{
    color: #b73b30;
  }

  .settings--logo{
    width: 40px;
    height: auto;
  }

  .strong-settings{
    font-size: 14px;
    @media screen and (min-width: 768px) {
      font-size: 16px;
    }
  }

  .modify-account{
    font-size: 12px;
    text-decoration-line: underline;
    margin: 0;
    padding-top: 10px;
  }

  .menu-container{
    position: fixed;
    bottom: 0;
  }
  .logo_desktop{
    display: none;
    text-decoration: none;
    color: inherit;
    p{
      margin: 0;
      font-size: 14px;
      font-style: normal;
      color: inherit;
    }
    @media screen and (min-width: 768px) {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      margin-right: auto;
    }
  }
  .custom-footer {
    background-color: #ffffff;
    justify-content: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    align-items: center;
    form{
      margin: 0;
      all: inherit;
    }
    .nav-link{
      .menu-link-text{
        display: none;
      }
    }
    @media screen and (min-width: 768px) {
      bottom: unset;
      top: 0;
      gap:1rem;
      padding-left: 1rem;
      padding-right: 1rem;

      .nav-link{
        font-size: 14px;
        .menu-link-text{
          display: inline-block;
        }

      }
    }
  }

  .nav-link {
    color: var(--color-blue100);
    margin: 1rem 0rem;
  }

  .main{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    padding-bottom: 100px;
    @media screen and (min-width: 768px) {
      padding-bottom: 40px;
      padding-top: 160px;
    }
  }

  .main--logo{
    display: block;
    width: 280px;
    height: auto;
    margin: -2.5rem;
  }
  form .errorlist{
    list-style-type: none;
    padding-left: 0;
    font-size: 80%;
    color: red;
  }

  /* Étoile rouge pour les champs obligatoires */
  label.required::after {
    content: " *";
    color: var(--color-red-primary);
    font-weight: bold;
  }

  /* Styles spécifiques pour la déconnexion */
  .logout-container {
    width:90%;
  }

  .logout-btn {
    color: #a8131d;
    --bs-btn-border-color: #a8131d;
    align-self: center;
    width: 100%;
    text-align: center;
  }
}


.btn-primary{
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover{
  background-color: #b73b30;
  border-color: #b73b30;
  color: #ffffff;
}

.btn-primary:active{
  background-color: #b73b30;
  border-color: #b73b30;
  color: #ffffff;
}

.btn-link{
  color: var(--color-primary);
}

.btn-link:hover{
  color: #b73b30;
}


.settings__container{

  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 16px;
  background-color: #ffffff;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.06);
  margin: 0 auto;
  margin-bottom: 1rem;
  margin-top: 1rem;
  width: 85%;
  @media screen and (min-width: 768px) {
    flex-direction: row;
    padding: 2rem 2.5rem;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
  }
}

.settings__user-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 0 auto;

  @media screen and (min-width: 768px) {
    min-width: 280px;
  }
}

.settings__greeting {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: flex-start;

  @media screen and (min-width: 768px) {
    gap: 1rem;
    height: 100%;
  }
}

.settings__greeting-text {
  font-size: 1.05rem;
  color: #2c3e50;
  line-height: 1.6;
  margin: 0;

  strong {
    font-weight: 600;
    color: #1a1a1a;
  }

  @media screen and (min-width: 768px) {
    font-size: 1.15rem;
  }
}

.settings__btn-edit-account {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(211, 67, 54, 0.25);
  }
}

.settings__divider {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, #e0e0e0, transparent);
  margin: 0.5rem 0;

  @media screen and (min-width: 768px) {
    width: 1px;
    height: auto;
    min-height: 60px;
    background: linear-gradient(to bottom, transparent, #e0e0e0, transparent);
    margin: 0;
    flex-shrink: 0;
  }
}

.settings__institution-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  width: 100%;

  @media screen and (min-width: 768px) {
    flex: 1;
    min-width: 0;
  }
}

.settings__institution-group {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
}

.settings__institution-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  @media screen and (min-width: 768px) {
    font-size: 0.8rem;
  }
}

.settings__institution-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;

  @media screen and (min-width: 768px) {
    flex-direction: row;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
  }
}

.settings__institution-form {
  flex: 1;
  min-width: 0;
  margin: 0;

  @media screen and (min-width: 768px) {
    flex: 0 1 auto;
    min-width: 280px;
  }
}

.settings__institution-select {
  width: 100%;
  max-width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.95rem;
  background-color: #fafafa;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #333;

  &:hover {
    border-color: #ccc;
    background-color: #fff;
  }

  &:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 67, 54, 0.1);
    background-color: #fff;
  }

}

.settings__institution-name {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
  padding: 0.625rem 0.875rem;
  background-color: #f8f8f8;
  border-radius: 10px;
  border: 1.5px solid transparent;

  @media screen and (min-width: 768px) {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.settings__btn-edit-institution {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  border-radius: 8px;
  font-weight: 500;

  i {
    font-size: 0.75rem;
  }

  &:hover {
    background-color: rgba(211, 67, 54, 0.05);
    text-decoration: none;
  }

  @media screen and (min-width: 768px) {
    margin-left: 0;
  }
}

.settings__btn-add-institution {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
  border-radius: 10px;
  white-space: nowrap;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
  font-weight: 500;
  background-color: #0f3250;
  border-color: #0f3250;
  color: #ffffff;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 50, 80, 0.3);
  }

  @media screen and (min-width: 768px) {
    width: auto;
    margin-top: 0;
    align-self: flex-start;
    min-width: 280px;
  }
}