/** Color variables **/
:root {
	--mdc-theme-primary: #534e48;
	--mdc-shape-footer: 4px;
	--cas-theme-primary: #e4001f;
	--cas-theme-primary-light: #b50019;
	--cas-theme-secondary: #736c63;
	--white: #ffffff;
        --black: #000000;
}

.mt-2rem {
	margin-top: 2rem !important;
}

html {
	overflow-y: auto;
}

#app-bar {
        background-color: var(--white);
	padding: 8px 12px;
	height: 130px;
}

#app-bar > a {
	margin-right: auto;
	margin-left: auto;
	max-width: 1296px;
}

body {
        background-color: var(--white);
        /** Nécessaire afin de faire en sorte que le footer suive le contenu **/
        height: auto !important;
}

#div-main-content {
	margin-top: 3em !important;
        padding-top: 110px;
}

#main-content {
	max-width: 1296px;
	margin-bottom: 16px !important;
}

.banner-info {
	background-color: #FFFFFF !important;
}

.mdc-button--outline:not(:disabled, .reveal-password) {
	background-color: var(--cas-theme-secondary, #736c63);
}

.mdc-button--raised:not(:disabled, .reveal-password) {
	background-color: var(--cas-theme-primary, #e4001f);
}

.mdc-button--raised:not(:disabled, .reveal-password):hover {
	background-color: var(--cas-theme-secondary, #736c63);
}

.centeredBtn {
	left: 50%;
	transform: translate(-50%, 0);
}

.centeredBtn:hover {
	transform: translate(-50%, 0) scale(1.08) !important;
}

#loginFormCustomContent {
	border: 0.15em solid rgba(0, 0, 0, 0.125);
	border-radius: 0.25rem;
	padding: 1.25em;
}

#loginFormCustomPanelContent {
	border: 0.15em solid rgba(0, 0, 0, 0.125);
	border-radius: 0.25rem;
	padding: 1.25em;
}

.login-section {
	border-right: none;
}

.container-xxl {
	max-width: 95% !important;
}

.cas-profile-table {
        width: 100%;
        border-collapse: collapse;
}

.cas-profile-table th, .cas-profile-table td {
	border: 1px solid #ddd;
        padding: 0.5rem 1rem;
        text-align: center;
        vertical-align: middle;
	background: #ffffff;
}

.cas-profile-table th {
        background: #f6f6f6;
        font-weight: bold;
}

.cas-profile-table td.actions {
        text-align: right;
}

#cas-profile-logout-button:hover {
	transform: scale(1.08);
}

.cas-profile-totp-register-button:hover {
	transform: scale(1.08);
}

.noBoxShadow {
	box-shadow: none !important;
}

/** Footer **/
.cas-footer {
	background-color: var(--mdc-theme-primary);
	flex-direction: column;
	height: 130px;
	max-width: 1296px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	border-radius: var(--mdc-shape-footer);
}

.footer-logo{
	font-size: 13px;
	font-weight: 400;
	line-height: 16px;
	padding-top: 13px;
	text-align: center;
	max-width: 1140px;
}

.footer-links {
	color: var(--white) !important;
	font-size: 13px;
	font-weight: 400;
	line-height: 16px;
	padding-bottom: 13px;
	padding-top: 10.4px;
	text-align: center;
}

.footer-links a {
	color: var(--white) !important;
	font-size: 13px;
	font-weight: 400;
	line-height: 16px;
	margin-bottom: 0px;
	margin-left: 3.9px;
	margin-right: 3.9px;
	margin-top: 0px;
	text-align: center;
	text-decoration: none;
	text-decoration-color: rgb(255, 255, 255);
	text-decoration-line: none;
	text-decoration-style: solid;

}
.footer-links a:hover {
    color: var(--white) !important;
    text-decoration: underline;
}

.footer-logo img{
	height: 38px;
	line-height: 16px;
	text-align: center;
	vertical-align: baseline;
	width: 250px;
}

/* Changements pour rendre la fenêtre de saisie du code TOTP responsive (lors de l'association du générateur) */
.mdc-dialog__container {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mdc-dialog__surface {
  width: min(95vw, 560px);
  max-height: 90vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden; /* overflow géré par .mdc-dialog__content */
}

/* Le contenu devient scrollable */
.mdc-dialog__content {
  padding: 1rem 1.25rem;
  overflow: auto;
  /* max-height: calc(90vh - 120px); A remettre une fois que la bannière sera enlevée*/
  max-height: calc(85vh - 120px);
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

/* Pour garder les boutons visibles en bas */
.mdc-dialog__actions {
  border-top: 1px solid rgba(0,0,0,0.08);
  background: transparent;
}

/* Pour que le formulaire n'overflow pas horizontalement */
.mdc-dialog__content form {
  min-width: 0;
  word-break: break-word;
}

/** Bannière "CAS de recette" **/
/* Ruban coin (desktop/tablette) */
.env-ribbon {
  position: fixed;
  top: -20px;
  right: -20px;
  width: 220px;
  height: 220px;
  overflow: hidden;
  z-index: 1030;
  pointer-events: none;
}
.env-ribbon span {
  position: absolute;
  display: block;
  width: 260px;
  top: 72px;
  right: -44px;
  padding: 10px 0;
  background: #e53935;
  color: #fff;
  text-align: center;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

/* Bannière fine sticky (mobile) */
.env-banner {
  display: none;
}
@media (max-width: 576px) {
  .env-ribbon { display: none; }
  .env-banner {
    display: block;
    position: fixed;
    top: 0;
    z-index: 1030;
    background: #e53935;
    color: #fff;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 8px;
    width: 100%;
  }
}

/** Responsiveness **/
@media only screen and (min-width: 768px) {
        #cas-logo{
                display: flex;
        }
        #cas-logo-mobile{
                display: none;
        }
}

@media only screen and (max-width: 768px) {
	#cas-logo{
		display: none;
	}
	#cas-logo-mobile{
		display: flex;
	}

	.cas-profile-table,
	.cas-profile-table thead,
	.cas-profile-table tbody,
	.cas-profile-table th,
	.cas-profile-table td,
	.cas-profile-table tr {
		display: block;
		width: 100%;
	}

	.cas-profile-table thead {
		display: none; /* Cache l’en-tête sur mobile */
	}

	.cas-profile-table tr {
		margin-bottom: 1rem;
		border: 1px solid #eee;
		border-radius: 0.5rem;
		box-shadow: 0 1px 4px rgba(0,0,0,0.03);
		background: #fff;
	}

	.cas-profile-table td {
		position: relative;
		padding-left: 50%;
		min-height: 2.5em;
		border: none;
		border-bottom: 1px solid #eee;
	}

	.cas-profile-table td:before {
		position: absolute;
		left: 1rem;
		top: 0;
		width: 45%;
		white-space: nowrap;
		font-weight: bold;
		color: #555;
		content: attr(data-label);
	}

	#cas-profile-div-mfadevices {
		min-height: 200px;
	}

	#cas-profile-div-trusteddevices {
		min-height: 200px;
		margin-top: 2rem;
	}

	#cas-profile-div-sessions {
		min-height: 200px;
		margin-top: 4rem;
	}
	.mw-25 {
		max-width: 50%;
	}
}

@media only screen and (max-width: 320px) {
        #cas-profile-div-trusteddevices {
                margin-top: 3rem;
        }

        #cas-profile-div-sessions {
		min-height: 300px;
                margin-top: 7rem;
        }
}

@media (max-width: 480px) {
	.mdc-dialog__surface {
		width: calc(100vw - 32px);
	    	margin: 0 16px;
	    	/*max-height: 96vh;*/
	}
	.mdc-dialog__content {
	    	padding: 0.75rem;
	    	/*max-height: calc(96vh - 112px);*/
	}
        .mw-25 {
                max-width: 75%;
        }
}
