/* ------------------------------
            Root Variables
------------------------------ */
:root {
  --aefe-blue: #000091;
  --aefe-blue-light: #4b93d3;
  --aefe-white: #ffffff;
  --aefe-form-border-color: #1d68b7;
  --aefe-border-default-grey: #ddd;
  --aefe-text-mention-grey: #666;
  --aefe-text-content-grey: #3a3a3a;
  --aefe-font-primary: "Marianne", Arial, sans-serif !important;
  --aefe-font-secondary: "Spectral", Georgia, serif !important;
}

/* ------------------------------
          Layout & Containers
------------------------------ */
.login-portal.layout .center-segment > .ui.container > .ui.segment {
  border: none !important;
  padding: 2px;
  max-width: 700px !important;
  background: #f6f6f6 !important;
  font-family: var(--aefe-font-primary);
}

.login-portal.layout .center-segment > .ui.container.medium {
  max-width: 700px !important;
  margin-top: 1rem;
}

.login-portal.layout .center-segment > .ui.container > .ui.segment .ui.header:first-child,
.ui.header {
  font-family: var(--aefe-font-primary);
}

/* ------------------------------
          Base & Typography
------------------------------ */
body,
.login-portal,
.login-portal.layout,
.login-portal.layout .recovery-layout,
.login-portal.layout .page-wrapper,
.page-wrapper .layout-file,
.layout-file {
  background: var(--aefe-white) !important;
  font-family: var(--aefe-font-primary);
  color: black !important;
}

.article-content,
.aefe-footer-text,
h1,
h2,
h3 {
  font-family: var(--aefe-font-primary);
}

/* ------------------------------
            Links
------------------------------ */
a {
  color: var(--aefe-blue);
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  color: var(--aefe-blue-light);
  filter: brightness(0.85);
  text-decoration: none;
}

/* ------------------------------
        Header & Footer
------------------------------ */
.aefe-header,
.fr-footer {
  position: relative;
  background-color: #ffffff !important;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.aefe-header {
  top: 0;
  border-bottom: none;
}

.fr-footer {
  position: relative !important;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff !important;
  border-top: 1px solid #ccc;
  z-index: 1000;
  font: inherit;
  color: inherit;
  line-height: normal;
  padding: 0;
}

.footer-separator {
  height: 2px;
  background-color: var(--aefe-blue);
  border: none;
  margin: 0;
}

.aefe-header-container,
.aefe-footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.aefe-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 1rem;
  display: flex;
}

.aefe-header-logo,
.aefe-footer-logo {
  height: 100px;
  width: auto;
}

.aefe-footer-left {
  flex: 0 0 auto;
}

.fr-footer__content {
  display: flex;
  flex-direction: column;
  margin-left: auto;
  align-items: flex-end;
  text-align: right;
  min-width: 0;
}

.fr-footer__content-list {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.fr-footer__content-item {
  flex: 0 0 auto;
  min-width: unset;
}

.fr-footer__body {
  width: 100%;
}

.fr-footer__bottom-copy a {
  color: var(--aefe-text-mention-grey) !important;
  text-decoration: none;
}

.fr-footer__bottom-copy a:hover,
.fr-footer__bottom-copy a:focus,
.fr-footer__bottom-copy a:active {
  color: var(--aefe-text-mention-grey) !important;
}

.fr-footer__bottom {
  align-items: center;
  box-shadow: inset 0 1px 0 0 var(--aefe-border-default-grey);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.fr-footer__content-link {
display: inline-block;
  color: var(--aefe-text-content-grey) !important;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5rem;
  font-family: var(--aefe-font-primary) !important;
  word-break: break-word;
  text-align: center;
  white-space: nowrap;
}

.fr-footer__bottom-link {
  color: var(--aefe-text-mention-grey);
  font-size: .75rem;
  line-height: 1.25rem;
  font-family: var(--aefe-font-primary);
  text-decoration: none;
}

.fr-footer__bottom-link:hover,
.fr-footer__bottom-link:focus,
.fr-footer__bottom-link:active,
.fr-footer__bottom-link:visited {
  color: var(--aefe-text-mention-grey) !important;
  filter: none !important;
}

.aefe-logo-link {
  background-image: none !important;
  background-size: 0 0 !important;
  background-repeat: no-repeat;
}

/* ------------------------------
            Forms
------------------------------ */
.ui.form input,
.ui.form textarea,
.ui.selection.dropdown {
  border: none !important;
  border-bottom: 2px solid #666666 !important;
  background-color: #0d0d0d26 !important;
  color: black !important;
  border-radius: 0 !important;
  padding: 10px;
}

.ui.form input:focus,
.ui.form textarea:focus,
.ui.selection.dropdown:hover,
.ui.selection.dropdown:focus {
  border-bottom: 2px solid var(--aefe-blue-light) !important;
  box-shadow: 0 2px 5px rgba(0, 102, 179, 0.25);
}

/* ------------------------------
          Buttons
------------------------------ */
.ui.primary.button:not(.basic) {
  background: var(--aefe-blue) !important;
  color: var(--aefe-white) !important;
  border-radius: 0 !important;
  font-family: var(--aefe-font-primary);
  font-size: 16px;
  line-height: 1.5;
  padding: 12px 24px;
  text-align: center;
}

.ui.secondary.button {
  background: var(--aefe-white-light) !important;
  color: var(--aefe-blue) !important;
  font-family: var(--aefe-font-primary);
  border-radius: 0 !important;
  border: 2px solid var(--aefe-blue) !important;
  font-size: 16px;
  padding: 12px 24px;
  text-align: center;
  line-height: 1.5;
}

.ui.primary.button:not(.basic):hover,
.ui.primary.button:not(.basic):focus,
.ui.primary.button:not(.basic):active,
.ui.secondary.button:hover,
.ui.secondary.button:focus,
.ui.secondary.button:active {
  filter: brightness(0.85);
}

.ui.basic.button,
.ui.basic.buttons .button {
  color: var(--aefe-blue) !important;
  background: transparent !important;
}

.ui.basic.button:hover,
.ui.basic.button:focus,
.ui.basic.button:active,
.ui.basic.buttons .button:hover,
.ui.basic.buttons .button:focus,
.ui.basic.buttons .button:active {
  color: var(--aefe-blue-light) !important;
  background: var(--aefe-blue) !important;
}

.login-portal.layout .social-login .ui.button {
  background: var(--aefe-blue);
  color: var(--aefe-white);
  border-radius: 0 !important;
}

.login-portal.layout .social-login .ui.button:hover,
.login-portal.layout .social-login .ui.button:focus,
.login-portal.layout .social-login .ui.button:active {
  background: var(--aefe-blue) !important;
  filter: brightness(0.85);
}

/* ------------------------------
              Popup
------------------------------ */
.ui.popup {
  background-color: var(--aefe-white) !important;
  border: 2px solid var(--aefe-blue);
  color: black !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ui.popup:before,
.ui.bottom.popup:before,
.ui.top.popup:before,
.ui.left.popup:before,
.ui.right.popup:before,
.ui.left.center.popup:before,
.ui.right.center.popup:before {
  background: var(--aefe-blue) !important;
  box-shadow: none !important;
}

.ui.bottom.left.popup:before,
.ui.bottom.center.popup:before,
.ui.bottom.right.popup:before {
  box-shadow: -1px -1px 0 0 var(--aefe-blue);
}

.ui.left.center.popup:before {
  box-shadow: 1px -1px 0 0 var(--aefe-blue);
}

.ui.right.center.popup:before {
  box-shadow: -1px 1px 0 0 var(--aefe-blue);
}

.ui.popup .ui.button {
  border-radius: 0 !important;
  background-color: var(--aefe-blue);
  color: white !important;
  padding: 10px 20px;
  font-weight: bold;
  border: none;
}

.ui.popup .ui.button:hover {
  filter: brightness(0.95);
}

/* ------------------------------
          Header/Footer Links
------------------------------ */
.aefe-header a,
.aefe-footer a {
  text-decoration: none !important;
  color: inherit !important;
  font: inherit !important;
  background: none !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  line-height: normal !important;
  display: inline-block;
  border-bottom: none !important;
}

.aefe-header a > .aefe-header-logo::before,
.aefe-header a > .aefe-header-logo::after {
  display: none !important;
  content: none !important;
}

.aefe-footer a::before,
.aefe-footer a::after {
  display: none !important;
  content: none !important;
}

.aefe-header-logo {
  height: 100px;
  width: auto;
  margin: 0 auto;
  display: block;
}

/* -----------------------------------
    Style DSFR dans les pages d'erreur
-------------------------------------- */
.login-portal.layout .page-wrapper.error-page .center-segment > .ui.container > .ui.segment {
  background-color: #ffffff !important;
}

.ui.orange.segment:not(.inverted) {
  border-top: none !important;
}

.login-portal.layout .page-wrapper.error-page .slogan-message {
  color: #3a3a3a !important;
  text-align: left !important;
}

.error-page .ui.orange.attached.segment.mt-3::after {
  content: "La page que vous cherchez est introuvable. Excusez-nous pour la gêne occasionnée \A\A"
           "Si vous avez tapé l'adresse web dans le navigateur, vérifiez qu'elle est correcte. La page n'est peut-être plus disponible.\A\A"
           "Dans ce cas, pour continuer votre visite, vous pouvez consulter notre page d'accueil en cliquant sur le logo AEFE dans l'en-tête.";
  display: block;
  margin-top: 1rem;
  font-size: 1rem;
  color: #3a3a3a;
  line-height: 1.4;
  white-space: pre-wrap;
  font-family: 'Marianne', Arial, sans-serif;
  text-align: left !important;
}

.error-page .ui.orange.attached.segment.mt-3 {
color: #3a3a3a;
  padding: 2rem;
  margin-top: 2rem;
  border-radius: 0;
  box-shadow: none;
}

.error-page .ui.header.text-center.slogan-message {
  font-family: "Marianne", Arial, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #3a3a3a;
  text-align: center;
  margin: 0;
}

.error-page .ui.bottom.attached.warning.message {
  background-color: #ffffff !important;
  color: #3a3a3a !important;
  box-shadow: none !important;
  border: none !important;
}

.error-page .ui.message p {
  display: none !important;
  background-color: #ffffff !important;
}

.login-portal.layout
.portal-tagline-description[data-testid="password-recovery-support-message"] a[data-testid="password-recovery-resend-support-email"] {
  display: none;
}

.login-portal.layout
.portal-tagline-description[data-testid="password-recovery-support-message"]::after {
  content: "";
}

.login-portal.layout
  #reset-password-container .ui.input,
.login-portal.layout
  #reset-password2-container .ui.input {
  background-color: #e5e5e5 !important;
  border: none !important;
  box-shadow: none !important;
  border-bottom: 2px solid #666666 !important;
  border-radius: 0 !important;
  display: flex;
  align-items: center;
}

.login-portal.layout #reset-password-container .ui.input input,
.login-portal.layout #reset-password2-container .ui.input input {
  background-color: transparent !important;
  border: none !important;
  height: 100% !important;
  flex: 1;
}

.login-portal.layout #reset-password-container .ui.input i.icon,
.login-portal.layout #reset-password2-container .ui.input i.icon {
  background-color: transparent !important;
  padding: 0 10px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

form#passwordResetFor m .segment-form h2,
.ui.segment:has(#passwordResetForm) > h2 {
  font-weight: normal !important;
}

html, body {
  height: 100%;
  overflow-y: auto;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.login-portal.layout .page-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 2rem;
  box-sizing: border-box;
}

.login-portal.layout .center-segment {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 767px) {
  .fr-footer__content-list {
    flex-direction: column;
    gap: 0.5rem;
  }
  .fr-footer__content-item {
    min-width: auto;
  }
  .fr-footer__content-link {
    text-align: left;
  }
}

@media (max-height: 700px) {
  .login-portal.layout .page-wrapper {
    align-items: flex-start;
  }
}

@media (min-width: 62em) {
  .fr-footer__content {
    flex-basis: 60% !important;
    margin-top: 0;
  }
}

.fr-footer {
  position: relative;
  width: 100% !important;
  background-color: #ffffff;
  border-top: 1px solid #ccc;
}

.aefe-footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fr-footer__body,
.fr-footer__bottom {
  width: 100% !important;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.login-portal.layout .footer {
  padding: 0 !important;
}

.login-portal.layout footer {
  padding: 0 !important;
}



