
.admin-count-badge {
    display: inline-grid;
    place-items: center;
    width: max-content;
    min-width: 2rem;
    height: auto;
    aspect-ratio: 1;
    flex: 0 0 auto;
    align-self: center;
    justify-self: center;
    padding: 0.4rem;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

.admin-count-triangle {
    display: inline-grid;
    place-items: center;
    position: relative;
    isolation: isolate;
    min-width: 3.5rem;
    padding: 1.2rem 1.2rem 0.3rem;
    flex: 0 0 auto;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

.admin-count-triangle::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: #fd7e14;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.navbar .nav-link.admin-nav-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: max-content;
    height: auto;
    white-space: nowrap;
    padding: 0.5rem 1rem;
}

/* Layout du tableau de bord : 40/60 puis CDG fixe au-delà de 992px. */
@media (min-width: 576px) {
	.desktop-layout {
		flex-wrap: nowrap;
	}
}

@media (min-width: 576px) and (max-width: 991.98px) {
	.cdg-column {
		flex: 0 0 40%;
		max-width: 40%;
		width: 40%;
	}

	.cdd-column {
		flex: 0 0 60%;
		max-width: 60%;
		width: 60%;
	}
}

@media (min-width: 992px) {
	.cdg-column {
		flex: 0 0 400px;
		max-width: 400px;
	}

	.cdd-column {
		flex: 1 1 0;
		min-width: 0;
		max-width: none;
		width: auto;
	}
}

/* css pour le logo, la barre de navigation et l'image de fond selon ... : début */
	.logo-nav {
	    width: 100px;               /* valeur par défaut (mobile) */
	}
	.text-carroussel-index {
		font-size: 0.7rem;
	}
	@media (min-width: 576px) {   /* sm */
	    .logo-nav { width: 130px; }
		.text-carroussel-index {
			font-size: 0.8rem;
		}
	}
	@media (min-width: 768px) {   /* md */
	  .logo-nav { width: 160px; }
	  .navbar-collapse .nav-link { margin-bottom: 0; }
		.text-carroussel-index {
			font-size: 0.9rem;
		}
	}
	@media (min-width: 992px) {   /* lg */
	  .logo-nav { width: 200px; }
		.text-carroussel-index {
			font-size: 1rem;
		}
	}

	/* règle pour les liens du menu togglisé (xs uniquement) */	
	@media (max-width: 575.98px) {          /* breakpoint xs */
	    .navbar-collapse .nav-link {
	        margin-bottom: 0.5rem;          /* 8 px ≈ 0.5rem */
	    }
	}

	/* 1. règles communes à tous les utilisateurs */
	body {
	    background-size: cover;          /* couvre toute la fenêtre */
	    background-repeat: no-repeat;    /* pas de répétition */
	    background-position: center;     /* centré */
	    margin: 0;
	    min-height: 100vh;
	}
	
	/* 2. image de fond quand l’utilisateur est connecté */
	body.auth {
	    background-image: url("/static/clin_2026/img/caducee_fond_ecran_connecté.png");
	}
	
	/* 3. image de fond quand l’utilisateur n’est pas connecté */
	body.guest {
	    background-image: url("/static/clin_2026/img/vinci_fond_ecran.png");
	}
	
/* css pour le logo, la barre de navigation et l'image de fond selon ... : fin */
	/* =========================================================================*/
	
/* css pour l'icone toggle - trois petits traits empilés "warning" sur fond blanc opaque - : début */
/* -------------------------------------------------
	/*   Variables – ajustez facilement la taille du toggle
	   ------------------------------------------------- */
	:root{
	    --toggle-size: 1.8rem;
	    --radius: 0.4rem;
	    --white-opaque: rgba(255,255,255,0.5);
	    --orange-warn: #ff9800;
	    --thick-h: 0.25rem;
	    --thin-h: 0.25rem;
	}
	
	/* 1️⃣ Conteneur du toggle */
	button.navbar-toggler{
	    background: var(--white-opaque);
	    width: var(--toggle-size);
	    height: var(--toggle-size);
	    border:none;
	    border-radius: var(--radius);
	    position:relative;
	    cursor:pointer;
	    margin:0;
	    line-height:0;
	}
	
	/* 2️⃣ Barres communes */
	.bar{
	    position:absolute;
	    left:12%; right:12%;
	    border-radius:2px;
	}
	
	/* 3️⃣ Couleurs & épaisseurs */
	.bar.white.thick{ background:var(--white-opaque); height:var(--thick-h); }
	.bar.white.thin{  background:var(--white-opaque); height:var(--thin-h); }
	.bar.orange.thin{ background:var(--orange-warn); height:var(--thin-h); }
	
	/* 4️⃣ Placement vertical */
	.bar.white.thick.top{ top:calc(var(--thick-h)/2); }
	.bar.orange:nth-of-type(2){ top:calc(var(--thick-h) + var(--thin-h)*0); }
	.bar.white.thin:nth-of-type(3){ top:calc(var(--thick-h) + var(--thin-h)*1); }
	.bar.orange:nth-of-type(4){ top:calc(var(--thick-h) + var(--thin-h)*2); }
	.bar.white.thin:nth-of-type(5){ top:calc(var(--thick-h) + var(--thin-h)*3); }
	.bar.orange:nth-of-type(6){ top:calc(var(--thick-h) + var(--thin-h)*4); }
	.bar.white.thick.bottom{ top:calc(var(--thick-h) + var(--thin-h)*5); }
		/* -------------------------------------------------
		   7️⃣ (Optionnel) petit effet au survol / clic
		   ------------------------------------------------- */
		button.navbar-toggler:hover .bar-orange.thin{
		    filter: brightness(1.15);
		}
		button.navbar-toggler:active .bar{
		    transform: scaleY(0.9);
	}
/* css pour l'icone toggle - trois petits traits empilés - : fin */
	/* =========================================================================*/

/*css pour carroussel : début */
	/* =========================================================================*/
	.text-carroussel-index {
		width: 50%; 
		padding: 10px; 
		border: 3px solid #000; 
		/* border-top: none; supprimer la partie haute si besoin */
		/* border-right: none;  partie droite */
		/* border-bottom: none; partie basse */
		/* border-left: none;  partie gauche */
		border-color: var(--border-color, #000); /* couleur paramétrable */
	}
	.cadre-carroussel {
		border-radius: 30px; /* arrondi de 10px */
	}
	.ombre-carroussel {
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* exemple d'ombre */
	}
/*css pour carroussel : fin */
	/* =========================================================================*/
						
/* css pour bouton de navigation : début */
	/* Container pour aligner les boutons en ligne avec espace */
	.navbar-nav {
	  display: flex;
	  margin-right: 20px; /* Marge entre le dernier bouton et le bord droit */
	}
	
	/* Boutons pour s'adapter à la longueur du texte */
	.nav-item .nav-link {
	  padding: 8px 16px; /* Padding pour ajuster la taille */
	  white-space: nowrap; /* Empêche le texte de se couper */
	  display: inline-block; /* Pour que la taille s'ajuste au contenu */
	  min-width: auto; /* La largeur s'adapte au contenu */
	  background-color: rgba(255,255,255,0.75); /* fond blanc avec opacite */
	}
	
	/* Le menu est ouvert → la div .collapse possède la classe .show */
	.collapse.show .navbar-nav .nav-link .rounded-pill {
	    /* 30 % de hauteur en moins → 70 % de la hauteur d’origine */
	    height: 70%;
	    /* 20 % de largeur en moins → 80 % de la largeur d’origine */
	    width: 80%;
	    /* Séparation extérieure de 3 px entre les liens */
	    margin: 0 3px;
	    /* Nécessaire pour que width/height et margin fonctionnent */
	    display: inline-block;
	    box-sizing: border-box;
	}
	
	/* (Optionnel) centrer le groupe de liens dans le menu */
	.collapse.show .navbar-nav {
	    justify-content: center;   /* ou flex-end pour aligner à droite */
	}
/* css pour bouton de navigation : fin */
	/* =========================================================================*/
	
/* css pour bouton 'submit' : début */
	/* =========================================================================*/
	.bg-white-80 {
		background-color: rgba(255,255,255,1);
        }
    .btn-nav-like {
        padding: 8px 16px;
        white-space: nowrap;
        min-width: auto;
    }
/* css pour bouton 'submit' : fin */
	/* =========================================================================*/

/* css de texte : début */
	/* pour les textes "larges" qui méritent d'avoir une justification gauche/droite */
	.text-justify {
	  text-align: justify !important;
	}
	
	/* pour taille relative 1.5rem */
	.taille-1-5rem {
	  font-size: 1.5rem;
	}	
	/* pour taille relative 0.8rem */
	.taille-0-8rem {
	  font-size:0.8rem;
	}
	.text-shadow {
		text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
	}
/* css de texte : fin */
	/* =========================================================================*/
	
/* css de footer : début */
	/* =========================================================================*/
	.site-footer {
	    /* Valeurs par défaut – vous les remplacerez dans le template */
	    background-color: rgba(0, 0, 0, 0.5);
	    padding: 20px 0;
	    color: #fff;               /* texte blanc pour contraste */
	}		
	.menu-footer {
	    /* Valeurs par défaut – vous les remplacerez dans le template */
	    background-color: rgba(0, 0, 0, 0.5);
	    padding: 2px 0;
	    color: #fff;               /* texte blanc pour contraste */
	}		
/* css de footer : fin */
	/* =========================================================================*/

/* css de lien avec <a ...> et <button ...> : début */	
	/* =========================================================================*/

	/* animation */
	a.enfoncement,
	button.enfoncement {
	  transition: transform 0.2s ease, box-shadow 0.2s ease;
	  /* Ombre initiale (optionnelle) */
	  background-color: transparent;
	  box-shadow: 0 8px 12px rgba(0, 0, 0, 1);
	}
	
	a.enfoncement:hover,
	button.enfoncement:hover {
	  transform: translateY(2px); /* effet d'enfoncement */
	  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.9); /* ombre plus prononcée lors du survol */
	  background-color: rgba(255,255,255,1); /* fond blanc lors du hover */
	}
/* css de lien avec <a ...> et <button ...> : fin */	
	/* =========================================================================*/
	
/* divers */	
	/* marge basse de 5 rem */
	.mb-5rem {
	    margin-bottom: 5rem !important;
	}
	
	.hidden { display: none !important;}
	
/* .btn-nav-like-bold { @extend .btn-nav-like; @extend .fw-bold; }*/

/* classe pour adresse-resultat */
	.adresse-resultat {
	    width: 500px;
	    overflow: hidden;
	    white-space: nowrap;
	    text-overflow: ellipsis;
	}
	
/* classe pour candidate-card */
	/*.candidate-card {
	 # max-width: 100%;
	# width: 100%; 
	}*/

	.candidature-niveau1 {
	    background-color: rgba(255, 255, 255, 0.8);
	    padding: 10px;
	    border-radius: 5px;
		list-style-type: circle; /* Puce : disque (par défaut) */
	}
	
	.candidature-niveau1 .candidature-niveau2 {
	    background-color: rgba(255, 255, 255, 0.8);
	    padding: 20px;
	    border-radius: 5px;
		list-style-type: disc; /* Puce : disque (par défaut) */
	}
	
.avatar-preview {
    max-width: 100px;
    height: auto;
    border-radius: 50%;
}

.help-button {
	position: fixed;
	right: max(1rem, env(safe-area-inset-right));
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 1030;
	display: grid;
	place-items: center;
	width: 3.25rem;
	height: 3.25rem;
	border: 2px solid #664d03;
	border-radius: 50%;
	background: #ffc107;
	color: #212529;
	box-shadow: 0 3px 12px rgb(0 0 0 / 25%);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	animation: help-turn 7s ease-in-out infinite;
}

.help-button:hover,
.help-button:focus-visible {
	background: #ffca2c;
	color: #212529;
}

@keyframes help-turn {
	0%, 85% { transform: rotate(0deg); }
	95%, 100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.help-button {
		animation: none;
	}
}

/* Styles auparavant definis directement dans les templates du site. */
.account-form-card {
	width: 100%;
	max-width: 460px;
}

.account-form-card--compact {
	max-width: 420px;
}

.account-form-card--wide {
	max-width: 500px;
}

.guide-container {
	max-width: 1100px;
}

.guide-content img {
	display: block;
	max-width: min(100%, 400px);
	height: auto;
	margin-inline: auto;
}

.guide-content blockquote {
	max-width: min(100%, 400px);
	margin: 1rem auto 0.5rem;
	padding: 1rem 1.25rem;
	background-color: #f1f3f5;
	border-left: 4px solid #adb5bd;
}

.guide-content blockquote p:last-child {
	margin-bottom: 0;
}

.carousel-stage {
	min-height: 400px;
}

.carousel-photo-panel {
	width: 20%;
	padding-inline: 5px;
}

.carousel-slide-title {
	font-size: 1.2rem;
}

.page-info-panel {
	display: block;
	margin-inline: auto;
	border-color: #ff9970;
}

.page-return-link {
	border-color: #ccc;
}

.profile-card-avatar {
	width: 100px;
	height: 100px;
	object-fit: cover;
}

.thematic-checkbox-cell {
	width: 3rem;
}

.poste-autocomplete-help {
	font-size: 1.5rem;
	cursor: help;
	color: #0d6efd;
}

.conversation-avatar-fallback {
	width: 48px;
	height: 48px;
}

.conversation-bubble {
	max-width: 75%;
}

.footer-top {
	display: flex;
	justify-content: space-between;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.footer-column {
	flex: 1;
	margin: 0 10px;
}

.footer-copyright {
	margin-top: 15px;
	color: #fff;
	text-align: center;
}

.footer-links {
	display: flex;
	justify-content: center;
	margin-top: 10px;
}

.footer-links a {
	margin: 0 15px;
	color: #fff;
	text-decoration: none;
}

/* Editeur historique du template allauth de secours, conserve hors flux actif. */
body.legacy-allauth-entrance form input:not([type="submit"]):not([type="checkbox"]),
body.legacy-allauth-entrance form textarea,
body.legacy-allauth-entrance form select {
	display: block;
	width: 100%;
	padding: 0.375rem 0.75rem;
	font-size: 1rem;
	line-height: 1.5;
	color: #212529;
	background-color: #fff;
	background-image: none;
	border: 1px solid #dee2e6;
	border-radius: 0.375rem;
	margin-bottom: 1rem;
}

body.legacy-allauth-entrance form input[type="submit"],
body.legacy-allauth-entrance form button[type="submit"] {
	display: inline-block;
	font-weight: 400;
	line-height: 1.5;
	color: #fff;
	text-align: center;
	background-color: #0d6efd;
	border: 1px solid #0d6efd;
	padding: 0.375rem 0.75rem;
	border-radius: 0.375rem;
	width: 100%;
	cursor: pointer;
}

body.legacy-allauth-entrance .errorlist {
	color: #721c24;
	background-color: #f8d7da;
	border: 1px solid #f5c2c7;
	border-radius: 0.375rem;
	padding: 0.75rem 1.25rem;
	margin-bottom: 1rem;
	list-style: none;
}

/* Select2 de recherche d'adresses. */
.select2-adresse .select2-selection__rendered,
.select2-adresse .select2-results__option {
	font-size: 0.8rem !important;
	min-width: 100% !important;
	width: auto !important;
}

/* Styles partages par les formulaires de thèse. */
.thesis-form,
.thesis-form .form-group,
.thesis-form .django-ckeditor-widget,
.thesis-form .django-ckeditor-widget textarea,
.thesis-form .django-ckeditor-widget iframe,
.thesis-form .cke,
.thesis-form .cke_editor,
.thesis-form .cke_inner,
.thesis-form .cke_contents {
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none;
}

.nav-thesis-logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.nav-thesis-logo img {
	width: auto !important;
	height: 40px !important;
	object-fit: contain;
}

.nav-thesis-title {
	flex: 1 1 auto;
	text-align: center;
}

.nav-thesis-actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	margin-left: auto;
}

@media (max-width: 767.98px) {
	.nav-thesis-bar {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto auto;
		align-items: center;
		gap: 0.25rem 0.5rem;
	}

	.nav-thesis-title {
		grid-column: 1 / -1;
		grid-row: 2;
		width: 100%;
		margin: 0.35rem 0;
	}

	.nav-thesis-logo {
		grid-column: 1;
		grid-row: 1;
	}

	.nav-thesis-actions {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
		min-width: 0;
	}
}

.group1-primary-type {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	width: fit-content;
}

.group1-section-title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.group1-primary-type input[type="checkbox"] {
	flex: 0 0 auto;
	margin: 0;
}

.group1-primary-type label {
	display: inline;
}

.group1-meta-analysis {
	padding-left: 0.25rem;
	padding-right: 0.25rem;
}

.group1-study-panel {
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 0.25rem;
	padding: 1rem 1.25rem 0.5rem;
	margin-bottom: 1.5rem;
}

.group1-study-help {
	margin: 0 0 0.75rem;
	text-align: center;
}

.group1-field-help {
	margin: 0.35rem 0 0;
}

#group1-form .group1-meta-field .ck-editor__editable_inline {
	min-height: 3.5em;
	height: 3.5em;
	overflow-y: auto;
}

#group1-form .group1-objective-field .ck-editor__editable_inline {
	min-height: 8.5em;
	height: 8.5em;
	overflow-y: auto;
}

#group1-form .group1-primary-criterion-field .ck-editor__editable_inline,
#group1-form .group1-secondary-criteria-field .ck-editor__editable_inline {
	min-height: 5.25em;
	height: 5.25em;
	overflow-y: auto;
}

#group1-form.thesis-form .group1-design-row {
	display: flex !important;
	flex-direction: row !important;
	gap: 1.25rem;
	align-items: flex-start;
	width: 100%;
}

#group1-form.thesis-form .group1-design-panel {
	display: block;
	flex: 1 1 0;
	min-width: 0;
	width: 100%;
	margin: 0;
}

@media (max-width: 767.98px) {
	#group1-form.thesis-form .group1-design-row {
		flex-direction: column !important;
	}
}

.thesis-form .django-ckeditor-widget {
	display: block !important;
}

.thesis-form .form-group:has(.thesis-description-editor) .ck-editor__editable_inline {
	min-height: 120px;
}

.thesis-form .form-group:has(.thesis-abstract-editor) .ck-editor__editable_inline {
	min-height: 200px;
}

.thesis-form .cke_editor {
	display: table !important;
	table-layout: fixed;
}

.thesis-form .cke,
.thesis-form .cke_inner,
.thesis-form .cke_contents,
.thesis-form .cke iframe {
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none;
}

@media (min-width: 992px) {
	.thesis-form .w-lg-50,
	.thesis-form .w-xl-50,
	.thesis-form .w-xxl-50,
	.thesis-form .django-ckeditor-widget,
	.thesis-form .cke_editor {
		width: 50% !important;
	}
}

#group2-form .group2-section-help,
#group2-form .group2-field-help {
	font-weight: 700;
	font-style: italic;
}

#group2-form .group2-research-box {
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 0.25rem;
	padding: 0.65rem 0.85rem;
	margin-top: 0.85rem;
}

#group2-form .group2-research-title {
	margin: 0 0 0.45rem;
	font-weight: 700;
	font-style: italic;
}

#group2-form .group2-coordination-options {
	display: flex;
	gap: 0.5rem;
}

#group2-form .group2-coordination-options input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

#group2-form .group2-coordination-options label {
	cursor: pointer;
	min-width: 4rem;
	text-align: center;
}

#group2-form .group2-postal-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

#group2-form .group2-postal-row input {
	width: 8rem;
}

#group2-form .group2-postal-city {
	min-height: 1.5rem;
}

#group2-form .group2-maturity-row,
#group2-form .group2-progress-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
}

#group2-form .group2-references-editor + .ck-editor__editable_inline {
	min-height: 12em;
}

#group2-form .group2-toggle {
	appearance: none;
	width: 3.5rem;
	height: 1.8rem;
	border-radius: 1rem;
	background: #777;
	position: relative;
	cursor: pointer;
	transition: background 0.2s ease;
	vertical-align: middle;
}

#group2-form .group2-toggle::before {
	content: "";
	position: absolute;
	width: 1.4rem;
	height: 1.4rem;
	left: 0.2rem;
	top: 0.2rem;
	border-radius: 50%;
	background: white;
	transition: transform 0.2s ease;
}

#group2-form .group2-toggle:checked {
	background: #198754;
}

#group2-form .group2-toggle:checked::before {
	transform: translateX(1.7rem);
}

#group3-form .group3-help {
	font-weight: 700;
	font-style: italic;
}

#group3-form .group3-thematiques-list {
	columns: 2;
}

@media (min-width: 992px) {
	#group3-form .group3-thematiques-list {
		columns: 3;
	}
}

@media (min-width: 1400px) {
	#group3-form .group3-thematiques-list {
		columns: 4;
	}
}

#group3-form .group3-other-field .ck-editor__editable_inline {
	min-height: 4em;
	height: 4em;
}

@media (max-width: 767.98px) {
	#group3-form .group3-thematiques-list {
		columns: 1;
	}
}
