﻿/* ========================================
   STYLES GLOBAUX & CONTENEUR PRINCIPAL
   ======================================== */

.apply-container {
	max-width: 1000px;
	margin: 0 auto;
	padding: 40px 20px;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.apply-header {
	text-align: center;
	margin-bottom: 40px;
	padding-bottom: 30px;
	border-bottom: 2px solid #e0e0e0;
}

.university-logo {
	max-width: 120px;
	height: auto;
	margin-bottom: 20px;
	filter: drop-shadow(0 2px 4px rgba(0, 51, 102, 0.1));
}

h1 {
	text-align: center;
	color: #003366;
	font-size: 36px;
	font-weight: 800;
	margin: 15px 0;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
	letter-spacing: -0.5px;
}

.apply-header p {
	text-align: center;
	color: #666;
	font-size: 16px;
	margin: 10px 0 0 0;
	font-weight: 400;
	line-height: 1.6;
}

/* ========================================
   MESSAGES D'ALERTE (SUCCESS/ERROR)
   ======================================== */

.success-message {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	padding: 18px 22px;
	margin-bottom: 25px;
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	border-left: 5px solid #28a745;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
	animation: slideInDown 0.4s ease;
}

	.success-message .success-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 32px;
		width: 32px;
		height: 32px;
		background: #28a745;
		color: white;
		border-radius: 50%;
		font-weight: bold;
		font-size: 18px;
		flex-shrink: 0;
	}

	.success-message strong {
		color: #155724;
		display: block;
		font-size: 16px;
		margin-bottom: 5px;
	}

	.success-message p {
		color: #155724;
		margin: 0;
		font-size: 14px;
		line-height: 1.5;
	}

.error-message {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	padding: 18px 22px;
	margin-bottom: 25px;
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	border-left: 5px solid #dc3545;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
	animation: slideInDown 0.4s ease;
}

	.error-message .error-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 32px;
		width: 32px;
		height: 32px;
		background: #dc3545;
		color: white;
		border-radius: 50%;
		font-weight: bold;
		font-size: 20px;
		flex-shrink: 0;
	}

	.error-message strong {
		color: #721c24;
		display: block;
		font-size: 16px;
		margin-bottom: 5px;
	}

	.error-message p {
		color: #721c24;
		margin: 0;
		font-size: 14px;
		line-height: 1.5;
	}

/* ========================================
   FORMULAIRE WRAPPER
   ======================================== */

.form-wrapper {
	background: white;
	border-radius: 12px;
	padding: 40px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	border-top: 4px solid #003366;
}

/* ========================================
   COMPOSANTS DEVEXPRESS - FORM LAYOUT
   ======================================== */

.dx-form-layout {
	background: transparent !important;
}

.dx-form-group-caption {
	font-size: 18px !important;
	font-weight: 700 !important;
	color: #003366 !important;
	margin-bottom: 20px !important;
	padding-left: 0 !important;
	border-bottom: 2px solid #e0e0e0;
	padding-bottom: 12px !important;
}

.dx-form-group {
	margin-bottom: 30px !important;
}

.dx-layout-item {
	padding-bottom: 15px !important;
}

/* ========================================
   LABELS & CAPTIONS
   ======================================== */

.dx-field-label {
	font-weight: 600 !important;
	color: #333 !important;
	font-size: 14px !important;
	margin-bottom: 8px !important;
}

	.dx-field-label::after {
		content: '' !important;
		margin-left: 0 !important;
	}

/* ========================================
   TEXTBOX & INPUT FIELDS
   ======================================== */

.dx-textbox,
.dx-textbox-container,
.dx-textbox-input {
	width: 100% !important;
}

.dx-textbox {
	border: 1px solid #ddd !important;
	border-radius: 6px !important;
	padding: 10px 12px !important;
	font-size: 14px !important;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	background: white !important;
	color: #333 !important;
}

	.dx-textbox:hover {
		border-color: #999 !important;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
	}

	.dx-textbox:focus,
	.dx-textbox-focused {
		border-color: #003366 !important;
		box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
		outline: none !important;
	}

	.dx-textbox::placeholder {
		color: #999 !important;
		opacity: 0.7 !important;
	}

/* ========================================
   MEMO / TEXTAREA
   ======================================== */

.dx-memo {
	border: 1px solid #ddd !important;
	border-radius: 6px !important;
	padding: 10px 12px !important;
	font-size: 14px !important;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
	transition: all 0.3s ease !important;
	background: white !important;
	color: #333 !important;
	line-height: 1.6 !important;
}

	.dx-memo:hover {
		border-color: #999 !important;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
	}

	.dx-memo:focus,
	.dx-memo-focused {
		border-color: #003366 !important;
		box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
		outline: none !important;
	}

/* ========================================
   COMBOBOX / SELECT DROPDOWNS
   ======================================== */

.dx-combobox,
.dx-combobox-container {
	width: 100% !important;
}

.dx-combobox-container {
	border: 1px solid #ddd !important;
	border-radius: 6px !important;
	transition: all 0.3s ease !important;
	background: white !important;
}

.dx-combobox-field {
	padding: 10px 12px !important;
	font-size: 14px !important;
	color: #333 !important;
}

.dx-combobox-field-option {
	color: #333 !important;
}

.dx-combobox-container:hover {
	border-color: #999 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.dx-combobox-container.dx-state-focused {
	border-color: #003366 !important;
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
	outline: none !important;
}

.dx-combobox-popup {
	border: 1px solid #ddd !important;
	border-radius: 6px !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.dx-combobox-item {
	padding: 10px 14px !important;
	font-size: 14px !important;
	color: #333 !important;
	transition: background 0.2s ease !important;
}

	.dx-combobox-item:hover {
		background: #f0f5ff !important;
		color: #003366 !important;
	}

.dx-combobox-item-selected {
	background: #e8f1ff !important;
	color: #003366 !important;
	font-weight: 600 !important;
}

/* ========================================
   DATEBOX / DATE PICKER
   ======================================== */

.dx-datebox,
.dx-datebox-container {
	width: 100% !important;
}

.dx-datebox-container {
	border: 1px solid #ddd !important;
	border-radius: 6px !important;
	transition: all 0.3s ease !important;
}

.dx-datebox-field {
	padding: 10px 12px !important;
	font-size: 14px !important;
	color: #333 !important;
}

.dx-datebox-container:hover {
	border-color: #999 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.dx-datebox-container.dx-state-focused {
	border-color: #003366 !important;
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.dx-popup-date-box {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
	border-radius: 8px !important;
}

.dx-calendar {
	background: white !important;
}

.dx-calendar-cell {
	color: #333 !important;
}

	.dx-calendar-cell:hover {
		background: #f0f5ff !important;
	}

	.dx-calendar-cell.dx-state-selected {
		background: #003366 !important;
		color: white !important;
	}

/* ========================================
   SPINBOX / NUMBER INPUTS
   ======================================== */

.dx-numberbox,
.dx-spinbox,
.dx-spinbox-container {
	width: 100% !important;
}

.dx-spinbox-container {
	border: 1px solid #ddd !important;
	border-radius: 6px !important;
	transition: all 0.3s ease !important;
}

.dx-spinbox-field {
	padding: 10px 12px !important;
	font-size: 14px !important;
	color: #333 !important;
}

.dx-spinbox-container:hover {
	border-color: #999 !important;
}

.dx-spinbox-container.dx-state-focused {
	border-color: #003366 !important;
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1) !important;
}

.dx-spinbutton {
	color: #003366 !important;
	transition: all 0.2s ease !important;
}

	.dx-spinbutton:hover {
		background: #f0f5ff !important;
	}

/* ========================================
   UPLOAD DE FICHIERS
   ======================================== */

.file-uploaded {
	display: inline-block;
	margin-top: 8px;
	padding: 8px 12px;
	background: #d4edda;
	color: #155724;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	border-left: 3px solid #28a745;
}

.certificates-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
}

	.certificates-list .file-uploaded {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

/* ========================================
   INPUT FILE (NATIF BLAZOR)
   ======================================== */

input[type="file"] {
	display: block;
	width: 100%;
	padding: 10px;
	border: 2px dashed #ddd;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 13px;
	color: #666;
}

	input[type="file"]:hover {
		border-color: #003366;
		background: #f8f9fa;
	}

	input[type="file"]:focus {
		outline: 2px solid #003366;
		outline-offset: 2px;
	}

/* ========================================
   BOUTONS DEVEXPRESS
   ======================================== */

.dx-button {
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
	font-size: 15px !important;
	padding: 10px 24px !important;
	text-transform: none !important;
}

.dx-button-text {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
}

/* Bouton Primary (Soumettre) */
.dx-button-primary,
.dx-button-success {
	background: linear-gradient(135deg, #003366 0%, #004d99 100%) !important;
	border: none !important;
	color: white !important;
	box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3) !important;
}

	.dx-button-primary:hover:not(.dx-state-disabled),
	.dx-button-success:hover:not(.dx-state-disabled) {
		background: linear-gradient(135deg, #004d99 0%, #003366 100%) !important;
		box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4) !important;
		transform: translateY(-2px) !important;
	}

	.dx-button-primary:active:not(.dx-state-disabled),
	.dx-button-success:active:not(.dx-state-disabled) {
		transform: translateY(0) !important;
		box-shadow: 0 2px 8px rgba(0, 51, 102, 0.3) !important;
	}

	.dx-button-primary.dx-state-disabled,
	.dx-button-success.dx-state-disabled {
		background: #ccc !important;
		cursor: not-allowed !important;
		opacity: 0.65 !important;
		box-shadow: none !important;
	}

/* Bouton Secondary (Réinitialiser) */
.dx-button-secondary {
	background: #95a5a6 !important;
	border: none !important;
	color: white !important;
	box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3) !important;
}

	.dx-button-secondary:hover:not(.dx-state-disabled) {
		background: #7f8c8d !important;
		box-shadow: 0 6px 18px rgba(127, 140, 141, 0.4) !important;
		transform: translateY(-2px) !important;
	}

	.dx-button-secondary:active:not(.dx-state-disabled) {
		transform: translateY(0) !important;
		box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3) !important;
	}

	.dx-button-secondary.dx-state-disabled {
		background: #ccc !important;
		cursor: not-allowed !important;
		opacity: 0.65 !important;
	}

/* ========================================
   BUTTON GROUP LAYOUT
   ======================================== */

.button-group {
	display: flex;
	gap: 15px;
	margin-top: 35px;
	justify-content: center;
	flex-wrap: wrap;
}

	.button-group .dx-button {
		min-width: 140px;
		flex: 1;
		max-width: 220px;
	}

/* ========================================
   ANIMATIONS KEYFRAMES
   ======================================== */

@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* ========================================
   FOCUS STATES (ACCESSIBILITY)
   ======================================== */

.dx-textbox:focus-visible,
.dx-memo:focus-visible,
.dx-combobox:focus-visible,
.dx-datebox:focus-visible,
.dx-numberbox:focus-visible {
	outline: 2px solid #003366 !important;
	outline-offset: 2px !important;
}

.dx-button:focus-visible {
	outline: 2px solid white !important;
	outline-offset: -3px !important;
}

/* ========================================
   PLACEHOLDER & DISABLED STATES
   ======================================== */

.dx-field-label-null {
	color: #999 !important;
}

.dx-textbox:disabled,
.dx-memo:disabled,
.dx-combobox-container.dx-state-disabled,
.dx-datebox-container.dx-state-disabled,
.dx-spinbox-container.dx-state-disabled {
	background: #f5f5f5 !important;
	color: #999 !important;
	border-color: #ddd !important;
	cursor: not-allowed !important;
	opacity: 0.6 !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
	.apply-container {
		padding: 20px 15px;
	}

	.apply-header {
		margin-bottom: 30px;
		padding-bottom: 20px;
	}

	.university-logo {
		max-width: 100px;
	}

	h1 {
		font-size: 28px;
		margin: 12px 0;
	}

	.apply-header p {
		font-size: 14px;
	}

	.form-wrapper {
		padding: 25px;
		border-radius: 10px;
	}

	.dx-form-group-caption {
		font-size: 16px !important;
	}

	.button-group {
		flex-direction: column;
		gap: 12px;
		margin-top: 25px;
	}

		.button-group .dx-button {
			max-width: 100%;
			width: 100%;
		}

	.success-message,
	.error-message {
		padding: 15px 18px;
		gap: 12px;
	}

		.success-message strong,
		.error-message strong {
			font-size: 15px;
		}

		.success-message p,
		.error-message p {
			font-size: 13px;
		}
}

@media (max-width: 480px) {
	.apply-container {
		padding: 15px 10px;
	}

	.apply-header {
		margin-bottom: 25px;
		padding-bottom: 15px;
	}

	.university-logo {
		max-width: 80px;
		margin-bottom: 15px;
	}

	h1 {
		font-size: 22px;
		margin: 10px 0;
	}

	.apply-header p {
		font-size: 12px;
	}

	.form-wrapper {
		padding: 18px;
		border-radius: 8px;
	}

	.dx-form-group-caption {
		font-size: 15px !important;
		margin-bottom: 15px !important;
	}

	.dx-field-label {
		font-size: 13px !important;
	}

	.dx-textbox,
	.dx-memo,
	.dx-combobox-field,
	.dx-datebox-field,
	.dx-spinbox-field {
		font-size: 13px !important;
		padding: 9px 10px !important;
	}

	.button-group {
		gap: 10px;
		margin-top: 20px;
	}

		.button-group .dx-button {
			padding: 10px 18px !important;
			font-size: 14px !important;
		}

	.success-message,
	.error-message {
		padding: 12px 14px;
		gap: 10px;
		margin-bottom: 20px;
	}

		.success-message .success-icon,
		.error-message .error-icon {
			min-width: 28px;
			width: 28px;
			height: 28px;
			font-size: 16px;
		}

	.file-uploaded {
		font-size: 12px;
		padding: 6px 10px;
	}
}

/* ========================================
   DARK MODE SUPPORT (OPTIONNEL)
   ======================================== */

@media (prefers-color-scheme: dark) {
	.apply-container {
		background: #1a1a1a;
	}

	.apply-header {
		border-bottom-color: #333;
	}

	h1 {
		color: #74b9ff;
	}

	.apply-header p {
		color: #bbb;
	}

	.form-wrapper {
		background: #2d2d2d;
		border-top-color: #74b9ff;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	}

	.dx-form-group-caption {
		color: #74b9ff !important;
		border-bottom-color: #444 !important;
	}

	.dx-field-label {
		color: #ddd !important;
	}

	.dx-textbox,
	.dx-memo,
	.dx-combobox-container,
	.dx-datebox-container,
	.dx-spinbox-container {
		background: #3a3a3a !important;
		color: #eee !important;
		border-color: #555 !important;
	}

		.dx-textbox:hover,
		.dx-memo:hover,
		.dx-combobox-container:hover,
		.dx-datebox-container:hover,
		.dx-spinbox-container:hover {
			border-color: #74b9ff !important;
		}

		.dx-textbox:focus,
		.dx-memo:focus,
		.dx-textbox-focused,
		.dx-memo-focused,
		.dx-combobox-container.dx-state-focused,
		.dx-datebox-container.dx-state-focused,
		.dx-spinbox-container.dx-state-focused {
			border-color: #74b9ff !important;
			box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.2) !important;
		}

		.dx-textbox::placeholder {
			color: #777 !important;
		}

	.dx-combobox-popup {
		background: #3a3a3a !important;
		border-color: #555 !important;
	}

	.dx-combobox-item {
		color: #ddd !important;
	}

		.dx-combobox-item:hover {
			background: #445a6f !important;
			color: #74b9ff !important;
		}

	.dx-combobox-item-selected {
		background: #003d66 !important;
		color: #74b9ff !important;
	}

	.dx-calendar {
		background: #3a3a3a !important;
		color: #ddd !important;
	}

	.dx-calendar-cell {
		color: #ddd !important;
	}

		.dx-calendar-cell:hover {
			background: #445a6f !important;
		}

		.dx-calendar-cell.dx-state-selected {
			background: #003366 !important;
		}

	.file-uploaded {
		background: #2a4a3a !important;
		color: #8fdb9d !important;
		border-left-color: #2a8a3a !important;
	}

	.success-message {
		background: linear-gradient(135deg, #1e3a2f 0%, #2a4a3a 100%);
		border-left-color: #28a745;
	}

	.error-message {
		background: linear-gradient(135deg, #3a1e1f 0%, #4a2a2a 100%);
		border-left-color: #dc3545;
	}
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
	.button-group,
	.apply-header {
		display: none;
	}

	.form-wrapper {
		box-shadow: none;
		border: 1px solid #ddd;
	}
}
