:root {
  --aefe-blue: #000091;
  --aefe-blue-light: #4b93d3;
  --aefe-white: #ffffff;
  --aefe-white-light: #fff;
  --aefe-grey: #f5f5f5;
  --aefe-grey-dark: #b3b3b3;
  --aefe-border-default-grey: #ddd;
  --aefe-text-mention-grey: #666;
  --aefe-text-content-grey: #3a3a3a;
  --aefe-form-border-color: #666666;
  --aefe-font-primary: "Marianne", Arial, sans-serif !important;
  --aefe-font-secondary: "Spectral", Georgia, serif !important;
}

/* ------------------------------
          Base & Typography
------------------------------ */
body,
.login-portal.layout,
.login-portal.layout .page-wrapper,
.login-portal.layout .page-wrapper.success-page,
.login-portal.layout .page-wrapper.error-page {
  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;
}

/* ------------------------------
        Preloader / Dimmer
------------------------------ */
.pre-loader-wrapper,
.ui.inverted.dimmer {
  background: var(--aefe-blue-light);
}

/* ------------------------------
         Login Container
------------------------------ */
.login-portal.layout .center-segment > .ui.container > .ui.segment {
  border: none !important;
  padding: 20px;
  background: #f6f6f6 !important;
}

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

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

.fr-footer {
  bottom: 0;
  border-top: none;
  z-index: 100;
}

.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-logo,
.aefe-footer-logo {
  height: 100px;
  width: auto;
}

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

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

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

.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 {
  color: var(--aefe-text-content-grey) !important;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5rem;
  font-family: var(--aefe-font-primary) !important;
  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;
}

/* ------------------------------
            Formulaire
------------------------------ */
.segment-form {
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 80px !important;
}

/* ------------------------------
        Inputs AEFE
------------------------------ */
.ui.form input:not([type]),
.ui.form input[type],
.ui.form textarea,
.ui.selection.dropdown {
  background-color: #e5e5e5 !important;
  border: none !important;
  border-bottom: 2px solid var(--aefe-form-border-color) !important;
  color: black !important;
  border-radius: 0 !important;
  padding: 10px;
  max-width: 100% !important;
  font-family: var(--aefe-font-primary) !important;
}

.ui.form .field:first-child {
  margin-bottom: 1.5rem;
}

.ui.input.right.icon {
  position: relative;
  background-color: #0d0d0d26 !important;
}

#password-eye {
  position: absolute;
  top: -2.6rem;
  right: 0.5rem;
  cursor: pointer;
  font-size: 1.2rem;
}
#password-eye::after {
  content: "Afficher";
  font-family: var(--aefe-font-primary);
  display: inline-block;
  margin-left: -5rem;
  color: var(--aefe-blue);
  font-size: 1.2rem;
  font-weight: bold;
  vertical-align: middle;
}

.ui.form input:focus,
.ui.form textarea:focus,
.ui.selection.dropdown:hover,
.ui.selection.dropdown:focus {
  box-shadow: 0 2px 5px rgba(0, 102, 179, 0.25);
}

.ui.form input:-webkit-autofill {
  background-color: #e5e5e5 !important;
  -webkit-box-shadow: 0 0 0 1000px #e5e5e5 inset !important;
  -webkit-text-fill-color: black !important;
}

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

.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.secondary.button:hover,
.ui.primary.button:not(.basic):focus,
.ui.secondary.button:focus,
.ui.primary.button:not(.basic):active,
.ui.secondary.button:active {
  filter: brightness(0.85);
}

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

.login-portal.layout .social-login .ui.button {
  background: var(--aefe-blue);
  color: var(--asg-external-login-button-base-text-color);
  border-radius: 0 !important;
}
.login-portal.layout .social-login .ui.button:hover {
  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 {
  background-color: var(--aefe-blue);
  color: white !important;
  border-radius: 50px !important;
  padding: 10px 20px;
  font-weight: bold;
  border: none;
}
.ui.popup .ui.button:hover {
  filter: brightness(0.95);
}
.ui.button.basic.link-button,
.ui.button.basic.link-button.primary {
  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;
  max-width: 100% !important;
  padding-top: 1rem !important;
}
.ui.button.basic.link-button.primary:hover {
  background: var(--aefe-grey-dark) !important;
  color: #000 !important;
  filter: brightness(0.95);
}

/* ------------------------------
      Titles / Headers
------------------------------ */
.ui.header {
  font-family: var(--aefe-font-primary) !important;
  font-size: 2rem !important;
  color: #161616 !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  line-height: 1.2;
}

h1, h2, h3 {
  font-family: var(--aefe-font-primary) !important;
  color: #161616;
}

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

.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;
}

.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-logo-link {
  background-image: none !important;
  background-size: 0 0 !important;
  background-repeat: no-repeat;
}

/* ------------------------------
            Divers
------------------------------ */
#chkRemember,
#chkRemember + label,
.ui.form input[type="checkbox"],
.ui.warning.bottom.attached.message .message-content a[href*="apple.com"],
.ui.warning.bottom.attached.message .message-content a[href*="play.google.com"],
.ui.warning.bottom.attached.message i.icon,
.ui.warning.bottom.attached.message,
.ui.warning.bottom.attached.message .message-content {
  display: none !important;
  background-color: #f6f6f6 !important;
}

[data-testid="cookie-policy-link"] {
  color: var(--aefe-blue-light) !important;
  font-weight: bold;
}
[data-testid="cookie-policy-link"]:hover {
  color: #ffffff !important;
}

/* --------------------------------
            Bandeau d'information
----------------------------------- */
.segment-form .ui.visible.message {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  color: #2a2a2a;
  font-family: var(--aefe-font-primary) !important;
  font-size: 1rem;
  padding: 1rem 1.5rem 1rem 1rem;
  border: 1px solid #ce0500;
  border-left: 2rem solid #ce0500;
  border-radius: 0 !important;
}

.segment-form .ui.visible.message::before {
  content: "\2716";
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 20px;
  background-color: #ffffff;
  color: #ce0500;
  font-size: 0.85rem;
  font-weight: bold;
  text-align: center;
  line-height: 20px;
  clip-path: polygon(
    25% 0%, 75% 0%,
    100% 50%,
    75% 100%, 25% 100%,
    0% 50%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ce0500;
  box-sizing: border-box;
}

/* -----------------------------------
    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: var(--aefe-font-primary) !important;
  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: var(--aefe-font-primary) !important;
  font-size: 2rem;
  font-weight: 700;
  color: #3a3a3a;
  text-align: center;
  margin: 0;
}

.ui.segment.cookie-consent-banner {
  display: none !important;
}

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

.login-portal.layout .center-segment {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.ui.button.basic.link-button,
.ui.button.basic.link-button.primary,
.ui.button.basic.link-button.secondary {
 width: 100%;
}

.login-portal.layout .center-segment {
  width: 100%;
}

.login-portal.layout .page-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 1rem;
  box-sizing: border-box;
  padding-top: 0.1rem !important;
}

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

@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: 600px) {
  .login-portal.layout .page-wrapper {
    align-items: flex-start;
    padding-top: calc(100px + 1rem);
    padding-bottom: 2rem;
  }
}

@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;
}





