/* Styles pour les notifications */
.notification-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
	max-width: 400px;
}

.notification {
	background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
	border-radius: 12px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
	margin-bottom: 10px;
	overflow: hidden;
	transform: translateX(100%);
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	border-left: 4px solid #28a745;
	backdrop-filter: blur(10px);
}

.notification.show {
	transform: translateX(0);
	opacity: 1;
}

.notification.hide {
	transform: translateX(100%);
	opacity: 0;
}

.notification.success {
	border-left-color: #00ff88;
	box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.notification.error {
	border-left-color: #ff4757;
	box-shadow: 0 8px 25px rgba(255, 71, 87, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.notification.warning {
	border-left-color: #ffa502;
	box-shadow: 0 8px 25px rgba(255, 165, 2, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.notification.info {
	border-left-color: #3742fa;
	box-shadow: 0 8px 25px rgba(55, 66, 250, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.notification-content {
	padding: 16px 20px;
	display: flex;
	align-items: center;
}

.notification-icon {
	font-size: 24px;
	margin-right: 15px;
	flex-shrink: 0;
	text-shadow: 0 0 10px currentColor;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

.notification.success .notification-icon {
	color: #00ff88;
	text-shadow: 0 0 15px #00ff88;
}

.notification.error .notification-icon {
	color: #ff4757;
	text-shadow: 0 0 15px #ff4757;
}

.notification.warning .notification-icon {
	color: #ffa502;
	text-shadow: 0 0 15px #ffa502;
}

.notification.info .notification-icon {
	color: #3742fa;
	text-shadow: 0 0 15px #3742fa;
}

.notification-text {
	flex: 1;
	font-size: 15px;
	line-height: 1.4;
	color: #ffffff;
	font-weight: 500;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.notification-close {
	background: none;
	border: none;
	font-size: 20px;
	color: #ffffff;
	cursor: pointer;
	padding: 4px;
	margin-left: 12px;
	opacity: 0.7;
	transition: all 0.2s;
	border-radius: 4px;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.notification-close:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.1);
	transform: scale(1.1);
}

.notification-progress {
	height: 3px;
	background: rgba(0, 0, 0, 0.1);
	position: relative;
	overflow: hidden;
}

.notification-progress-bar {
	height: 100%;
	background: #28a745;
	width: 100%;
	transform: translateX(-100%);
	transition: transform linear;
}

.notification.success .notification-progress-bar {
	background: #28a745;
}

.notification.error .notification-progress-bar {
	background: #dc3545;
}

.notification.warning .notification-progress-bar {
	background: #ffc107;
}

.notification.info .notification-progress-bar {
	background: #17a2b8;
}

/* Styles pour les modales de confirmation */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease-in-out;
}

.modal-overlay.show {
	opacity: 1;
	visibility: visible;
}

.modal-confirm {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	max-width: 400px;
	width: 90%;
	margin: 20px;
	transform: scale(0.8) translateY(-20px);
	transition: all 0.3s ease-in-out;
	overflow: hidden;
}

.modal-overlay.show .modal-confirm {
	transform: scale(1) translateY(0);
}

.modal-confirm-header {
	padding: 20px 24px 16px;
	border-bottom: 1px solid #e9ecef;
	display: flex;
	align-items: center;
}

.modal-confirm-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	margin-right: 16px;
	flex-shrink: 0;
}

.modal-confirm-icon.warning {
	background: #fff3cd;
	color: #856404;
}

.modal-confirm-icon.danger {
	background: #f8d7da;
	color: #721c24;
}

.modal-confirm-icon.info {
	background: #d1ecf1;
	color: #0c5460;
}

.modal-confirm-title {
	font-size: 18px;
	font-weight: 600;
	color: #212529;
	margin: 0;
	line-height: 1.3;
}

.modal-confirm-body {
	padding: 20px 24px;
	color: #6c757d;
	line-height: 1.5;
}

.modal-confirm-footer {
	padding: 16px 24px 20px;
	display: flex;
	gap: 12px;
	justify-content: flex-end;
}

.modal-confirm-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 80px;
}

.modal-confirm-btn-secondary {
	background: #6c757d;
	color: #fff;
}

.modal-confirm-btn-secondary:hover {
	background: #5a6268;
	transform: translateY(-1px);
}

.modal-confirm-btn-danger {
	background: #dc3545;
	color: #fff;
}

.modal-confirm-btn-danger:hover {
	background: #c82333;
	transform: translateY(-1px);
}

.modal-confirm-btn-primary {
	background: #007bff;
	color: #fff;
}

.modal-confirm-btn-primary:hover {
	background: #0056b3;
	transform: translateY(-1px);
}

.modal-confirm-btn:active {
	transform: translateY(0);
}

/* Styles pour la modale d'upload d'avatar */
.modal-avatar {
	max-width: 500px;
	width: 95%;
}

.modal-avatar-header {
	text-align: center;
	padding: 24px 24px 16px;
	border-bottom: 1px solid #e9ecef;
}

.modal-avatar-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #f8f9fa;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	color: #6c757d;
	margin: 0 auto 16px;
	border: 2px dashed #dee2e6;
}

.modal-avatar-title {
	font-size: 20px;
	font-weight: 600;
	color: #212529;
	margin: 0 0 8px;
}

.modal-avatar-subtitle {
	font-size: 14px;
	color: #6c757d;
	margin: 0;
}

.modal-avatar-body {
	padding: 24px;
}

.avatar-upload-area {
	border: 2px dashed #dee2e6;
	border-radius: 12px;
	padding: 40px 20px;
	text-align: center;
	background: #f8f9fa;
	transition: all 0.3s ease;
	cursor: pointer;
	margin-bottom: 20px;
}

.avatar-upload-area:hover {
	border-color: #007bff;
	background: #f0f8ff;
}

.avatar-upload-area.dragover {
	border-color: #007bff;
	background: #e3f2fd;
	transform: scale(1.02);
}

.avatar-upload-icon {
	font-size: 48px;
	color: #6c757d;
	margin-bottom: 16px;
	display: block;
}

.avatar-upload-text {
	font-size: 16px;
	color: #495057;
	margin-bottom: 8px;
}

.avatar-upload-hint {
	font-size: 14px;
	color: #6c757d;
}

.avatar-preview {
	text-align: center;
	margin-bottom: 20px;
	display: none;
}

.avatar-preview img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Aperçu proportionnel pour montrer le redimensionnement */
.avatar-preview-square {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0 auto 12px;
    display: block;
}

.avatar-preview-info {
    margin-top: 12px;
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

.avatar-preview-note {
    font-size: 12px;
    color: #28a745;
    font-style: italic;
    margin-top: 8px;
}

.avatar-preview-info {
	margin-top: 12px;
	font-size: 14px;
	color: #6c757d;
}

.avatar-form-group {
	margin-bottom: 20px;
}

.avatar-form-label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #495057;
	margin-bottom: 8px;
}

.avatar-form-input {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #ced4da;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.3s ease;
}

.avatar-form-input:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.avatar-progress {
	display: none;
	margin-bottom: 20px;
}

.avatar-progress-bar {
	width: 100%;
	height: 8px;
	background: #e9ecef;
	border-radius: 4px;
	overflow: hidden;
}

.avatar-progress-fill {
	height: 100%;
	background: #007bff;
	width: 0%;
	transition: width 0.3s ease;
}

.avatar-progress-text {
	text-align: center;
	font-size: 12px;
	color: #6c757d;
	margin-top: 8px;
}

.avatar-error {
	background: #f8d7da;
	color: #721c24;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 20px;
	display: none;
}

.avatar-success {
	background: #d4edda;
	color: #155724;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 20px;
	display: none;
}

.avatar-footer {
	padding: 16px 24px 24px;
	display: flex;
	gap: 12px;
	justify-content: flex-end;
}

.avatar-btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 100px;
}

.avatar-btn-secondary {
	background: #6c757d;
	color: #fff;
}

.avatar-btn-secondary:hover {
	background: #5a6268;
	transform: translateY(-1px);
}

.avatar-btn-primary {
	background: #007bff;
	color: #fff;
}

.avatar-btn-primary:hover {
	background: #0056b3;
	transform: translateY(-1px);
}

.avatar-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.avatar-btn:active {
	transform: translateY(0);
}

/* Modal de confirmation de déconnexion */
.logout-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.logout-modal-overlay.show {
	opacity: 1;
	visibility: visible;
}

.logout-modal {
	background: #fff;
	border-radius: 12px;
	padding: 0;
	max-width: 400px;
	width: 90%;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	transform: scale(0.8) translateY(-20px);
	transition: all 0.3s ease;
	overflow: hidden;
}

.logout-modal-overlay.show .logout-modal {
	transform: scale(1) translateY(0);
}

.logout-modal-header {
	background: linear-gradient(135deg, #dc3545, #c82333);
	color: #fff;
	padding: 24px;
	text-align: center;
	position: relative;
}

.logout-modal-icon {
	font-size: 48px;
	margin-bottom: 12px;
	display: block;
}

.logout-modal-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.logout-modal-body {
	padding: 24px;
	text-align: center;
}

.logout-modal-message {
	font-size: 16px;
	color: #6c757d;
	margin-bottom: 24px;
	line-height: 1.5;
}

.logout-modal-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.logout-btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 100px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.logout-btn-cancel {
	background: #6c757d;
	color: #fff;
}

.logout-btn-cancel:hover {
	background: #5a6268;
	transform: translateY(-1px);
}

.logout-btn-confirm {
	background: #dc3545;
	color: #fff;
}

.logout-btn-confirm:hover {
	background: #c82333;
	transform: translateY(-1px);
}

.logout-btn:active {
	transform: translateY(0);
}

/* Correction du menu client header-account */

.header-account {
	position: static !important; /* Retire le positionnement absolu */
	min-width: 40px; /* Largeur minimale pour l'avatar seulement */
	margin-left: 0 !important; /* Retire la marge gauche par défaut */
}

.header-account__body {
	width: auto !important; /* Largeur automatique au lieu de 98px fixe */
	min-width: 120px; /* Largeur minimale pour le texte */
	max-width: 150px; /* Largeur maximale pour éviter que ça prenne trop de place */
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.header-account__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.header-account__icon {
	flex-shrink: 0; /* Empêche la compression des icônes */
	margin-left: 20px !important; /* Réduit l'espacement pour gagner de la place */
	margin-right: 0 !important; /* Supprime la marge droite */
}

.header-account__icon a {
	flex-shrink: 0; /* Empêche la compression des liens */
}

.header-account__icon a + a {
	margin-left: 20px !important; /* Réduit l'espacement entre les icônes */
}

/* Correction des autres éléments du header */
.header-cart-toggle,
.header-social-toggle,
.header-menu-toggle {
	margin-left: 0 !important; /* Retire les marges par défaut */
	flex-shrink: 0; /* Empêche la compression */
}

/* Masquer la barre de recherche sur les pages clients */
.header-search-toggle {
	display: none !important;
}

/* Masquer les réseaux sociaux dans l'espace client */
.header-social-toggle {
	display: none !important;
}

/* Masquer le texte "Bonjour !" dans l'espace client */
.header-account__body {
	display: none !important;
}

/* Styliser le lien avatar - style simple comme l'icône panier */
.header-account__avatar-link {
	display: block;
	text-decoration: none;
	transition: all 0.3s ease;
	position: relative;
}

/* Styliser le conteneur avatar - style simple comme l'icône panier */
.header-account__avatar {
	display: block;
	position: relative;
	margin-left: 15px; /* Espacement avec l'icône panier */
}

/* Styliser l'icône joystick dans l'avatar - style simple */
.header-account__avatar .df-icon--joystick {
	width: 32px;
	height: 32px;
	fill: #a3ff12;
	display: block;
}

.header-account__avatar-link:hover {
	opacity: 0.8;
}

.header-account__avatar-link:active {
	opacity: 0.6;
}

/* Tooltip pour indiquer les actions */
.header-account__avatar-link::after {
	content: "Clic gauche pour accéder au compte ou clic droit pour se déconnecter";
	position: absolute;
	bottom: -40px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 11px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 1000;
	pointer-events: none;
	text-align: center;
}

.header-account__avatar-link:hover::after {
	opacity: 1;
	visibility: visible;
}

/* Responsive pour les petits écrans */
@media (max-width: 768px) {
	
	.header-account {
		min-width: 35px;
	}
	
	.header-account__body {
		min-width: 80px;
		max-width: 100px;
	}
	
	.header-account__icon {
		margin-left: 10px !important;
	}
	
	.header-account__icon a + a {
		margin-left: 10px !important;
	}
}

@media (max-width: 480px) {
	
	.header-account {
		min-width: 30px;
	}
	
	.header-account__body {
		min-width: 60px;
		max-width: 80px;
		font-size: 0.6rem;
	}
	
	.header-account__name {
		font-size: 0.7rem;
	}
}

/* Styles pour les onglets d'avatar */
.avatar-tabs {
	display: flex;
	margin-bottom: 20px;
	border-bottom: 2px solid #e9ecef;
}

.avatar-tab {
	flex: 1;
	padding: 12px 16px;
	background: none;
	border: none;
	font-size: 14px;
	font-weight: 500;
	color: #6c757d;
	cursor: pointer;
	transition: all 0.3s ease;
	border-bottom: 3px solid transparent;
}

.avatar-tab:hover {
	color: #495057;
	background-color: #f8f9fa;
}

.avatar-tab.active {
	color: #007bff;
	border-bottom-color: #007bff;
	background-color: #f8f9fa;
}

.avatar-tab-content {
	display: none;
}

.avatar-tab-content.active {
	display: block;
}

/* Styles pour la galerie d'avatars */
.avatar-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 12px;
	max-height: 300px;
	overflow-y: auto;
	padding: 10px;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	background-color: #f8f9fa;
}

.avatar-gallery-loading {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	color: #6c757d;
	font-size: 14px;
}

.avatar-gallery-error {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	color: #dc3545;
	font-size: 14px;
}

.avatar-gallery-item {
	position: relative;
	cursor: pointer;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	border: 2px solid transparent;
}

.avatar-gallery-item:hover {
	transform: scale(1.05);
	border-color: #007bff;
	box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.avatar-gallery-item.selected {
	border-color: #28a745;
	box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.avatar-gallery-img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	display: block;
}

.avatar-gallery-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.avatar-gallery-item:hover .avatar-gallery-overlay,
.avatar-gallery-item.selected .avatar-gallery-overlay {
	opacity: 1;
}

.avatar-gallery-select {
	background: #28a745;
	color: white;
	border: none;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
}

.avatar-gallery-select:hover {
	background: #218838;
	transform: scale(1.1);
}

.avatar-gallery-item.selected .avatar-gallery-select {
	background: #dc3545;
}

.avatar-gallery-item.selected .avatar-gallery-select:hover {
	background: #c82333;
}
