/* Dashboard specific styles */

/* Subscription widgets */
.subscription-card {
    position: relative;
}

.subscription-card.trial {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
}

.subscription-card.active {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid #4caf50;
}

.subscription-card.expired {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #f44336;
}

.subscription-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.subscription-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.subscription-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.subscription-alert.expiring {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ff9800;
}

.subscription-alert.expired {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 1px solid #f44336;
}

.alert-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.alert-content p {
    margin: 0;
    color: #666;
    line-height: 1.4;
}

.alert-action .btn-upgrade {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.alert-action .btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    color: white;
    text-decoration: none;
}

/* Layout */
.dashboard-container {
	display: flex;
	min-height: calc(100vh - 60px); /* Header height */
}

.dashboard-sidebar {
	width: 250px;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	color: var(--text-primary);
	padding: 1.5rem 0;
	transition: all 0.3s ease;
	border-right: 1px solid var(--gray-200);
	box-shadow: var(--shadow-sm);
}

.dashboard-content {
	flex: 1;
	padding: 2rem;
	background-color: #f5f7fa;
	overflow-y: auto;
}

/* Sidebar styles */
.sidebar-header {
	padding: 0 1.5rem 1.5rem;
	border-bottom: 1px solid var(--gray-200);
	margin-bottom: 1.5rem;
}

.sidebar-user {
	text-align: center;
}

.user-avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	margin: 0 auto 1rem;
	box-shadow: var(--shadow);
}

.user-info {
	margin-bottom: 1rem;
}

.user-name {
	font-weight: bold;
	font-size: 1.1rem;
	margin-bottom: 0.25rem;
}

.user-role {
	opacity: 0.7;
	font-size: 0.9rem;
}

.sidebar-menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sidebar-menu li {
	padding: 0;
	margin: 0;
}

.sidebar-menu a {
	display: flex;
	align-items: center;
	padding: 0.8rem 1.5rem;
	color: var(--text-secondary);
	text-decoration: none;
	transition: all 0.2s ease;
	font-weight: 500;
	margin: 0 var(--space-2);
	border-radius: var(--radius-sm);
}

.sidebar-menu a:hover {
	background-color: var(--gray-100);
	color: var(--text-primary);
	transform: translateX(4px);
}

.sidebar-menu a.active {
	background: linear-gradient(135deg, var(--primary), var(--primary-light));
	color: white;
	box-shadow: var(--shadow);
	transform: translateX(4px);
}

.sidebar-menu .menu-icon {
	margin-right: 0.8rem;
	font-size: 1.2rem;
	width: 25px;
	text-align: center;
}

.sidebar-footer {
	margin-top: 2rem;
	padding: 1.5rem;
	border-top: 1px solid var(--gray-200);
}

/* Dashboard content */
.page-title {
	font-size: 1.8rem;
	margin-bottom: 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.stat-card {
	background: white;
	border-radius: 10px;
	padding: 1.5rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	display: flex;
	align-items: center;
}

.stat-icon {
	width: 50px;
	height: 50px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	margin-right: 1.2rem;
}

.stat-icon.primary {
	background-color: rgba(255, 107, 53, 0.1);
	color: var(--primary);
}

.stat-icon.secondary {
	background-color: rgba(46, 134, 171, 0.1);
	color: var(--secondary);
}

.stat-icon.tertiary {
	background-color: rgba(138, 173, 74, 0.1);
	color: var(--tertiary);
}

.stat-icon.accent {
	background-color: rgba(240, 200, 8, 0.1);
	color: var(--accent);
}

.stat-info h3 {
	font-size: 1.8rem;
	margin-bottom: 0.25rem;
	font-weight: bold;
}

.stat-info p {
	color: #666;
	margin: 0;
	font-size: 0.9rem;
}

.cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: var(--space-6);
	margin-bottom: var(--space-8);
}

.dashboard-card {
	background: white;
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow);
	border: 1px solid var(--gray-200);
	transition: all 0.3s ease;
	position: relative;
}

.dashboard-card:hover:not(a) {
	box-shadow: var(--shadow-lg);
	transform: translateY(-2px);
}

.dashboard-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--tertiary));
	border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.dashboard-card-header {
	padding: var(--space-6);
	border-bottom: 1px solid var(--gray-200);
	background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.dashboard-card-title {
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--text-primary);
	margin: 0;
}

.dashboard-card-body {
	padding: var(--space-6);
}

.dashboard-card-footer {
	padding: var(--space-4) var(--space-6);
	border-top: 1px solid var(--gray-200);
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: var(--gray-50);
}

/* Tables */
.table-responsive {
	overflow-x: auto;
}

.dashboard-table {
	width: 100%;
	border-collapse: collapse;
}

.dashboard-table th, 
.dashboard-table td {
	padding: 0.8rem 1rem;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.dashboard-table th {
	font-weight: 600;
	background-color: #f8f9fa;
}

.dashboard-table tr:last-child td {
	border-bottom: none;
}

.dashboard-table tr:hover td {
	background-color: #f8f9fa;
}

/* Actions */
.actions {
	display: flex;
	gap: 0.5rem;
}

.btn-action {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	background-color: #f0f0f0;
	color: #555;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-action:hover {
	background-color: #e0e0e0;
}

.btn-action.edit:hover {
	background-color: var(--secondary);
	color: white;
}

.btn-action.delete:hover {
	background-color: var(--danger);
	color: white;
}

.btn-action.view:hover {
	background-color: var(--info);
	color: white;
}

/* Create new button */
.btn-create {
	/*display: flex;*/
	align-items: center;
}

.btn-create i {
	margin-right: 0.5rem;
}

/* Amélioration des liens dans les cards */
a.dashboard-card {
	text-decoration: none;
	color: inherit;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.dashboard-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Style pour le lien "Voir tout" dans les en-têtes de carte */
.dashboard-card-header a {
	color: var(--secondary);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

.dashboard-card-header a:hover {
	color: var(--primary);
	text-decoration: underline;
}

/* Style pour les cartes avec liens dans le démarrage rapide */
.cards-grid a.dashboard-card h3 {
	color: var(--text-primary);
	margin-bottom: var(--space-2);
	font-size: 1.1rem;
	font-weight: 600;
}

.cards-grid a.dashboard-card p {
	color: var(--text-secondary);
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Amélioration de l'apparence au survol pour les cartes cliquables */
.cards-grid a.dashboard-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: var(--primary);
}

.cards-grid a.dashboard-card:active {
	transform: translateY(-2px);
}

/* Suppression du soulignement par défaut des liens dans tout le dashboard */
.dashboard-content a {
	text-decoration: none;
}

/* Responsive */
@media (max-width: 992px) {
	.dashboard-sidebar {
		width: 200px;
	}
	
	.cards-grid {
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
		gap: var(--space-4);
	}
}

@media (max-width: 768px) {
	.dashboard-container {
		flex-direction: column;
	}
	
	.dashboard-sidebar {
		width: 100%;
		order: 2;
	}
	
	.dashboard-content {
		order: 1;
		padding: var(--space-4);
	}
	
	.sidebar-header, .sidebar-footer {
		display: none;
	}
	
	.sidebar-menu {
		display: flex;
		justify-content: space-between;
		padding: var(--space-4);
		gap: var(--space-2);
	}
	
	.cards-grid {
		grid-template-columns: 1fr;
		gap: var(--space-4);
	}
	
	.sidebar-menu a {
		flex-direction: column;
		padding: var(--space-2);
		text-align: center;
		margin: 0;
		border-radius: var(--radius);
		font-size: 0.8rem;
	}
	
	.sidebar-menu .menu-icon {
		margin-right: 0;
		margin-bottom: var(--space-1);
		font-size: 1rem;
	}
	
	.sidebar-menu a.active {
		background: var(--primary);
		color: white;
		transform: none;
	}
}

/* Newsletter Dashboard Styles */
.newsletter-dashboard {
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
	border-radius: 12px;
	padding: var(--space-6);
	border: 1px solid rgba(37, 99, 235, 0.1);
}

.newsletter-input-group-dashboard {
	display: flex;
	gap: var(--space-3);
	align-items: stretch;
}

.newsletter-input-dashboard {
	flex: 1;
	padding: var(--space-3) var(--space-4);
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	background: white;
	color: #1a202c;
	font-size: 1rem;
	transition: all 0.3s ease;
}

.newsletter-input-dashboard:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.newsletter-submit-dashboard {
	background: var(--primary);
	color: white;
	border: none;
	padding: var(--space-3) var(--space-6);
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: var(--space-2);
	transition: all 0.3s ease;
	white-space: nowrap;
}

.newsletter-submit-dashboard:hover {
	background: #1d4ed8;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.newsletter-submit-dashboard:active {
	transform: translateY(0);
}

.newsletter-message-dashboard {
	padding: var(--space-4);
	border-radius: 8px;
	font-weight: 500;
	transition: all 0.3s ease;
}

.newsletter-message-dashboard.alert-success {
	background: rgba(34, 197, 94, 0.1);
	border: 1px solid rgba(34, 197, 94, 0.2);
	color: #16a34a;
}

.newsletter-message-dashboard.alert-danger {
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.2);
	color: #dc2626;
}

/* Newsletter Compact Styles */
.newsletter-card {
	background: white;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	overflow: hidden;
	transition: all 0.3s ease;
}

.newsletter-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.newsletter-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.newsletter-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all 0.3s ease;
}

.newsletter-icon.success {
	background: linear-gradient(135deg, #dcfce7, #bbf7d0);
	color: #16a34a;
	border: 2px solid #bbf7d0;
}

.newsletter-icon.inactive {
	background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
	color: #64748b;
	border: 2px solid #e2e8f0;
}

.newsletter-content {
	flex: 1;
	min-width: 0;
}

.newsletter-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.25rem 0;
	color: #1e293b;
}

.newsletter-email {
	font-size: 0.875rem;
	color: #64748b;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.btn-newsletter-action {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.btn-newsletter-action.primary {
	background: var(--primary);
	color: white;
}

.btn-newsletter-action.primary:hover {
	background: #1d4ed8;
	transform: scale(1.05);
}

.btn-newsletter-action.danger {
	background: #fee2e2;
	color: #dc2626;
}

.btn-newsletter-action.danger:hover {
	background: #fecaca;
	transform: scale(1.05);
}

.newsletter-description {
	padding: 0 0 0 1.25rem;
	margin: 0;
	font-size: 0.875rem;
	color: #64748b;
	line-height: 2rem;
}

/* États spécifiques */
.newsletter-subscribed-compact .newsletter-header {
	background: linear-gradient(135deg, #f0fdf4, #dcfce7);
	border-bottom: 1px solid #bbf7d0;
}

.newsletter-unsubscribed-compact .newsletter-header {
	background: linear-gradient(135deg, #f8fafc, #f1f5f9);
	border-bottom: 1px solid #e2e8f0;
}

/* Newsletter dashboard responsive */
@media (max-width: 768px) {
	.newsletter-header {
		padding: 1rem;
		gap: 0.75rem;
	}
	
	.newsletter-icon {
		width: 36px;
		height: 36px;
	}
	
	.newsletter-title {
		font-size: 0.95rem;
	}
	
	.newsletter-email {
		font-size: 0.8rem;
	}
	
	.btn-newsletter-action {
		width: 32px;
		height: 32px;
	}
	
	.newsletter-description {
		padding: 0 1rem 1rem 1rem;
		font-size: 0.8rem;
	}
	
	/* Anciens styles pour compatibilité */
	.newsletter-input-group-dashboard {
		flex-direction: column;
	}
	
	.newsletter-submit-dashboard {
		width: 100%;
		justify-content: center;
	}
}
/* Appareils tactiles (pas de survol possible) : les contrôles des cartes
   (configurations, boîtes, palettes) restent visibles en permanence */
@media (hover: none), (pointer: coarse) {
	.config-controls,
	.box-controls,
	.palette-controls {
		opacity: 1 !important;
		transform: none !important;
		position: static !important;
	}
}

/* Fil d'Ariane */
.breadcrumb-nav {
	margin-bottom: var(--space-4);
	font-size: 0.85rem;
}

.breadcrumb-nav ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	padding: 0;
	margin: 0;
}

.breadcrumb-nav li + li::before {
	content: '›';
	margin-right: var(--space-2);
	color: var(--gray-400);
}

.breadcrumb-nav a {
	color: var(--text-muted);
	text-decoration: none;
}

.breadcrumb-nav a:hover {
	color: var(--primary);
	text-decoration: underline;
}

.breadcrumb-nav [aria-current] {
	color: var(--text-primary);
	font-weight: 500;
}
