:root {
  --ube-red: #a10e2f;
  --ube-dark: #272833;
  --ube-text: #303030;
  --ube-muted: #535758;
  --ube-card: #f7f2ef;
  --ube-border: #e3e9da;
  --ube-page-bg: #ffffff;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AlongSanss2";
  src: url("../fonts/AlongSanss2-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AlongSanss2";
  src: url("../fonts/AlongSanss2-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ube-text);
  background: var(--ube-page-bg);
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

/* ------------------------------------------------------------------
   HEADER 
------------------------------------------------------------------ */
.header .region {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 1rem 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  border-bottom: 2rem solid var(--ube-red);
}

.header .region > div {
  margin: 0;
}

.header .region .ent-link {
  display: flex;
  align-items: center;
  padding: 0 !important;
  border: none;
  text-decoration: none;
}

.header-img {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.header-img img {
  display: block;
  height: 90px;
  width: auto;
  margin-right: 0.5rem;
}

.site-title {
  margin: 0 0 0 1.75rem;
  color: var(--ube-dark);
  font-family: "AlongSanss2", Arial, Helvetica, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.current-user {
  display: flex;
  align-items: center;
  padding: 0 1em;
}

/* ------------------------------------------------------------------
   CONTENU CENTRAL
------------------------------------------------------------------ */
.page-main {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2.65rem 1.5rem 7rem;
}

.welcome-cards {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.welcome-card,
.welcome-card:visited {
  min-height: 270px;
  padding: 2.05rem 2.5rem 2.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--ube-card);
  color: var(--ube-text);
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.welcome-card:hover,
.welcome-card:focus {
  background: var(--ube-red);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  outline: none;
}

.welcome-card:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 4px;
}

.welcome-card-title {
  min-height: 3.4rem;
  margin-bottom: 1rem;
  display: block;
  font-family: "AlongSanss2", Arial, Helvetica, sans-serif;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.welcome-card-icon {
  display: block;
  width: 74px;
  height: 74px;
  margin: 0.45rem 0 1.25rem;
  color: var(--ube-red);
  flex: 0 0 auto;
}

.welcome-card:hover .welcome-card-icon,
.welcome-card:focus .welcome-card-icon {
  color: #ffffff;
}

.welcome-card-text {
  display: block;
  max-width: 450px;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
}

/* ------------------------------------------------------------------
   FOOTER - structure et dimensions proches de _footer.jsp + custom.css
------------------------------------------------------------------ */
footer {
  flex-shrink: 0;
}

.fragment_204 {
  background-color: var(--ube-card);
}

.ft-item-socials {
  min-height: 49px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 10px;
  color: #ffffff;
  background-color: var(--ube-red);
  text-align: center;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.ft-item-socials ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 0;
  margin: 0;
  list-style-type: none;
  flex-wrap: wrap;
}

.ft-item-socials li {
  display: inline-flex;
  align-items: center;
}

.ft-item-socials a {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.ft-item-socials img {
  display: block;
  width: 23px;
  height: 23px;
  opacity: 0.85;
  transition: all 0.2s linear;
}

.ft-item-socials img[alt="YouTube"] {
  width: 24px;
  height: auto;
}

.ft-item-socials a img:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: brightness(0.8);
}

.footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 5px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  background: var(--ube-card);
  color: #d3d3d3;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 80%;
}

.footer .ft-item {
  flex: 1;
  width: 250px;
  padding-left: 10px;
  padding-right: 10px;
  display: flex;
  justify-content: center;
  color: var(--ube-muted);
  font-size: 1rem;
  line-height: 1.8rem;
  text-align: left;
}

.footer .ft-item p {
  margin: 0.75rem 0;
  font-weight: 400 !important;
}

.footer .ft-item-title {
  font-weight: 700;
  text-transform: uppercase;
}

.footer .ft-item img {
  max-width: 100%;
  display: inline-block;
}

.footer .ft-item ul,
.footer .ft-item li {
  margin: 0;
  padding: 0;
}

.footer .ft-item li {
  display: inline-block;
  list-style-type: none;
  line-height: 25px;
}

.footer .ft-item a {
  color: var(--ube-muted);
  text-decoration: none;
}

.footer .ft-item a:hover {
  text-decoration: underline;
}

.ft-images {
  flex: 2 !important;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ft-img {
  max-width: 50%;
  display: flex;
  align-items: center;
}

.logoub {
  width: 100%;
}

.footerList {
  display: flex;
  justify-content: center;
  background: var(--ube-card);
  color: var(--ube-muted);
  font-size: 0.8rem;
  text-align: center;
}

.footerList p {
  margin: 0.6rem 1rem 0.9rem;
}

.footerListOnMobile {
  display: none;
  background: var(--ube-card);
}

.footerListOnMobile-item {
  display: none;
  justify-content: center;
  align-items: center;
  color: var(--ube-muted);
  font-size: 0.9rem;
  text-align: center;
}

.footerListOnMobile-item p {
  margin: 0.25rem 1rem;
}

/* Largeurs max du footer reprises du CSS d'origine */
@media (min-width: 576px) {
  .footer {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .footer {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .footer {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .footer {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .footer {
    max-width: 1320px;
  }
}

/* ------------------------------------------------------------------
   RESPONSIVE TABLETTE
------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .page-main {
    padding: 2.25rem 1.25rem 5rem;
  }

  .welcome-cards {
    gap: 1.5rem;
  }

  .welcome-card,
  .welcome-card:visited {
    min-height: 260px;
    padding-left: 1.7rem;
    padding-right: 1.7rem;
  }

  .welcome-card-title {
    font-size: 1.28rem;
  }
}

@media (max-width: 900px) {
  .header .region {
    padding: 0.9rem 1rem 1.2rem;
  }

  .header-img img {
    height: 78px;
  }

  .site-title {
    margin-left: 1.1rem;
    font-size: 1rem;
    white-space: normal;
  }

  .welcome-cards {
    max-width: 620px;
    grid-template-columns: 1fr;
  }

  .welcome-card,
  .welcome-card:visited {
    min-height: 235px;
  }

  .footer {
    flex-direction: column;
  }

  .footer .ft-item {
    width: 100%;
    max-width: 620px;
    text-align: center !important;
  }

  .ft-images {
    justify-content: center;
  }
}

/* ------------------------------------------------------------------
   RESPONSIVE MOBILE
------------------------------------------------------------------ */
@media (max-width: 640px) {
  .header .region {
    align-items: flex-start;
    padding: 0.85rem 0.8rem 1rem;
    border-bottom-width: 1.5rem;
  }

  .header .region .ent-link {
    width: 100%;
  }

  .header-img img {
    height: 64px;
    margin-right: 0.4rem;
  }

  .site-title {
    margin-left: 0.55rem;
    padding-top: 0.25rem;
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .current-user {
    display: none;
  }

  .page-main {
    padding: 1.5rem 0.9rem 3rem;
  }

  .welcome-card,
  .welcome-card:visited {
    min-height: 225px;
    padding: 1.6rem 1.2rem;
  }

  .welcome-card-title {
    min-height: auto;
    margin-bottom: 0.8rem;
    font-size: 1.12rem;
    letter-spacing: 0.03em;
  }

  .welcome-card-icon {
    width: 58px;
    height: 58px;
    margin: 0.35rem 0 1rem;
  }

  .welcome-card-text {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .ft-item-socials {
    min-height: auto;
    padding: 0.75rem 0.75rem;
    font-size: 0.95rem;
  }

  .ft-item-socials ul {
    gap: 10px;
  }

  .footer .ft-item {
    line-height: 1.5rem;
    font-size: 0.92rem;
  }

  .ft-images {
    gap: 0.75rem;
  }

  .footerList {
    display: none;
  }

  .footerListOnMobile {
    display: block;
    padding: 0.4rem 0 0.8rem;
  }

  .footerListOnMobile-item {
    display: flex;
  }
}

@media (max-width: 380px) {
  .header-img img {
    height: 56px;
  }

  .site-title {
    font-size: 0.85rem;
  }

  .welcome-card-title {
    font-size: 1rem;
  }
}

/* ------------------------------------------------------------------
   FOOTER RESPONSIVE 
------------------------------------------------------------------ */
@media (max-width: 900px) {
  .ft-item-socials {
    min-height: 64px;
    padding: 0.85rem 1rem;
    font-size: clamp(1rem, 2.6vw, 1.6rem);
  }

  .ft-item-socials ul {
    gap: clamp(0.65rem, 2.5vw, 1.4rem);
  }

  .ft-item-socials img {
    width: clamp(24px, 4.4vw, 38px);
    height: clamp(24px, 4.4vw, 38px);
  }

  .ft-item-socials img[alt="YouTube"] {
    width: clamp(28px, 5vw, 44px);
    height: auto;
  }

  .footer {
    width: 100%;
    max-width: 100%;
    padding: 1.35rem 1rem 0.55rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .footer .ft-item {
    flex: 0 0 auto;
    width: 100%;
    max-width: 720px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    justify-content: center;
    text-align: center !important;
    color: var(--ube-muted);
    font-size: clamp(1.05rem, 3vw, 1.55rem);
    line-height: 1.75;
  }

  .footer .ft-item p {
    margin: 0.65rem 0;
  }

  .footer .ft-item-title {
    display: inline-block;
    margin-bottom: 0.25rem;
    font-size: clamp(1.05rem, 3vw, 1.55rem);
    line-height: 1.4;
    text-align: center;
  }

  .ft-images {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 0.75rem;
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(1.25rem, 4vw, 2.4rem);
  }

  .ft-img {
    max-width: 45%;
    justify-content: center;
  }

  .footer .ft-item ul {
    margin-top: 0.15rem;
  }

  .footer .ft-item li {
    line-height: 1.45;
  }

  .footer .ft-item a {
    font-size: clamp(1.05rem, 3vw, 1.55rem);
  }

  .footerList {
    display: flex;
    padding: 0.25rem 0 0.95rem;
    font-size: clamp(0.95rem, 2.45vw, 1.25rem);
    line-height: 1.4;
  }

  .footerList p {
    margin: 0.45rem 1rem 0;
  }

  .footerListOnMobile {
    display: none !important;
  }

  .footerListOnMobile-item {
    display: none !important;
  }
}

@media (max-width: 520px) {
  .ft-item-socials ul {
    row-gap: 0.55rem;
  }

  .ft-item-socials li:first-child {
    flex-basis: 100%;
    justify-content: center;
  }

  .footer {
    padding-top: 1.15rem;
  }

  .footer .ft-item {
    font-size: 1rem;
    line-height: 1.65;
  }

  .footer .ft-item-title,
  .footer .ft-item a {
    font-size: 1.05rem;
  }

  .ft-images {
    max-width: 330px;
    gap: 1rem;
  }

  .footerList {
    display: flex !important;
    font-size: 0.88rem;
  }
}

@media (max-width: 360px) {
  .footer .ft-item {
    font-size: 0.92rem;
  }

  .footer .ft-item-title,
  .footer .ft-item a {
    font-size: 0.98rem;
  }

  .footerList {
    font-size: 0.8rem;
  }
}
