:root {
	--primary: #DF7A5E;
	--primary-dark: #C66247;
	--primary-light: #FCECE8;
	--secondary: #2B3A41;
	--bg-color: #F9F8F6;
	--surface: #FFFFFF;

	--text-main: #2A2E2C;
	--text-muted: #8A928D;
	--border-color: #EAEBE9;

	--danger: #E63946;
	--danger-light: #FDECEE;
	--warning: #F4A261;
	--warning-light: #FDF3EB;
	--success: #2A9D8F;
	--success-light: #E9F5F4;

	--radius-xl: 32px;
	--radius-lg: 24px;
	--radius: 16px;

	--shadow-sm: 0 4px 12px rgba(43, 58, 65, 0.04);
	--shadow-md: 0 12px 24px -4px rgba(43, 58, 65, 0.08);
	--shadow-float: 0 24px 48px -12px rgba(223, 122, 94, 0.25);
	--shadow-glass: 0 8px 32px rgba(43, 58, 65, 0.05);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

body {
	font-family: 'Plus Jakarta Sans', sans-serif;
	background-color: var(--bg-color);
	color: var(--text-main);
	display: flex;
	justify-content: center;
}

/* Conteneur mobile-first */
.app-container {
	width: 100%;
	max-width: 600px;
	min-height: 100vh;
	background: var(--bg-color);
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.03);
	position: relative;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
}

/* HEADER GLASSMORPHISM */
.app-header {
	background: rgba(249, 248, 246, 0.85);
	backdrop-filter: blur(16px);
	color: var(--secondary);
	padding: 10px 15px;
	position: sticky;
	top: 0;
	z-index: 20;
	border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.header-content h1 {
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -0.5px;
	color: var(--secondary);
}

/* Bouton principal Ajouter */
.btn-add {
	background: var(--primary);
	color: white;
	border: none;
	padding: 0.6rem 1.2rem;
	border-radius: 100px;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	box-shadow: 0 4px 12px rgba(223, 122, 94, 0.3);
}

.btn-add:hover, .btn-add:active {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(223, 122, 94, 0.4);
	background: var(--primary-dark);
}

/* PROFIL AREA */
#profile-area {
	position: relative;
}

#profile-picture {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background-color: var(--primary-light);
	color: var(--primary);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	border: 2px solid var(--surface);
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s;
}

#profile-picture:hover {
	transform: scale(1.05);
}

#profile-info {
	align-items: center;
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background: var(--surface);
	padding: 1.2rem;
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-color);
	min-width: 200px;
	z-index: 100;
	animation: slideDownFade 0.2s ease-out;
}

#profile-info p {
	color: var(--secondary);
	font-size: 1.1rem;
	margin-bottom: 0.8rem;
}

#profile-info a {
	color: var(--primary);
	font-weight: 600;
	margin-bottom: 1rem;
}

#profile-info button {
	width: 100%;
}

/* TABS (Segmented Control style) */
.tabs {
	display: flex;
	background: rgba(234, 235, 233, 0.6);
	padding: 4px;
	margin: 0.5rem 1.5rem 1.5rem 1.5rem;
	border-radius: 100px;
}

.tab-btn {
	flex: 1;
	padding: 0.7rem;
	border: none;
	background: transparent;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text-muted);
	cursor: pointer;
	border-radius: 100px;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tab-btn.active {
	background: var(--surface);
	color: var(--secondary);
	box-shadow: var(--shadow-sm);
}

/* VIEWS & FILTERS */
.view {
	display: none;
	padding: 0 1.5rem 2rem 1.5rem;
	flex: 1;
	animation: fadeIn 0.4s ease-out;
}

.view.active {
	display: block;
}

.filters {
	display: flex;
	gap: 0.8rem;
	overflow-x: auto;
	padding-bottom: 1.5rem;
	scrollbar-width: none;
}

.filters::-webkit-scrollbar {
	display: none;
}

.filter-btn {
	padding: 0.6rem 1.2rem;
	border-radius: 100px;
	border: 1px solid var(--border-color);
	background: var(--surface);
	color: var(--text-muted);
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: var(--shadow-sm);
}

.filter-btn.active {
	background: var(--secondary);
	color: white;
	border-color: var(--secondary);
}

/* CARDS */
.card-list {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.card {
	background: var(--surface);
	border-radius: var(--radius-lg);
	padding: 1.2rem;
	display: flex;
	gap: 1.2rem;
	box-shadow: var(--shadow-sm);
	border: 1px solid rgba(0, 0, 0, 0.02);
	align-items: center;
	transition: all 0.3s ease;
	animation: slideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-md);
}

.card-img-wrapper {
	width: 75px;
	height: 75px;
	border-radius: var(--radius);
	background: var(--bg-color);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
	border: 1px solid var(--border-color);
}

.card-img-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	padding: 5px;
}

.card-emoji {
	font-size: 2.5rem;
}

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

.card-title {
	font-weight: 800;
	font-size: 1.05rem;
	color: var(--secondary);
	margin-bottom: 0.4rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.card-meta {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	font-size: 0.85rem;
	color: var(--text-muted);
	margin-bottom: 1rem;
}

.badge-location {
	background: var(--bg-color);
	padding: 0.3rem 0.6rem;
	border-radius: 8px;
	font-weight: 700;
	color: var(--secondary);
}

.card-actions {
	display: flex;
	gap: 0.5rem;
}

.btn-status {
	flex: 1;
	padding: 0.6rem;
	border: none;
	background: var(--success-light);
	color: var(--success);
	border-radius: 10px;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-status.opened {
	background: var(--warning-light);
	color: var(--warning);
}

.btn-icon {
	background: var(--bg-color);
	border: none;
	color: var(--text-muted);
	width: 40px;
	border-radius: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.btn-icon:hover {
	background: var(--border-color);
	color: var(--secondary);
}

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

/* RECIPES */
.recipe-controls {
	margin-bottom: 2rem;
	background: var(--surface);
	padding: 1.5rem;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.control-label {
	display: block;
	font-weight: 700;
	color: var(--secondary);
	margin-bottom: 0.8rem;
	font-size: 1rem;
}

.select-wrapper {
	position: relative;
	margin-bottom: 1.5rem;
}

select {
	width: 100%;
	appearance: none;
	padding: 1.2rem;
	border-radius: 16px;
	border: 2px solid var(--bg-color);
	background: var(--bg-color);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: var(--secondary);
	cursor: pointer;
	transition: border 0.2s;
}

select:focus {
	outline: none;
	border-color: var(--primary-light);
}

.select-wrapper::after {
	content: '▾';
	position: absolute;
	right: 1.2rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.2rem;
	color: var(--text-muted);
	pointer-events: none;
}

.btn-primary {
	width: 100%;
	background: var(--secondary);
	color: white;
	border: none;
	padding: 1.2rem;
	border-radius: 16px;
	font-size: 1.05rem;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(43, 58, 65, 0.2);
	transition: all 0.3s;
}

.btn-primary:active {
	transform: scale(0.98);
	box-shadow: none;
}

.recipe-card {
	background: var(--surface);
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow-md);
	animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
	margin-bottom: 1.5rem;
}

.recipe-card img {
	width: 100%;
	height: 250px;
	object-fit: cover;
}

.recipe-body {
	padding: 1.8rem;
}

.recipe-body h2 {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--secondary);
	margin-bottom: 1rem;
	line-height: 1.2;
}

.recipe-tags {
	display: inline-block;
	background: var(--bg-color);
	color: var(--secondary);
	padding: 0.4rem 0.8rem;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 700;
	margin-bottom: 1.2rem;
}

.recipe-ingredients {
	font-size: 0.95rem;
	color: var(--text-muted);
	margin-bottom: 1.8rem;
	line-height: 1.6;
	background: var(--bg-color);
	padding: 1rem;
	border-radius: 12px;
}

.recipe-ingredients strong {
	color: var(--secondary);
}

.recipe-steps {
	padding-left: 1.2rem;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--secondary);
}

.recipe-steps li {
	margin-bottom: 0.8rem;
	padding-left: 0.5rem;
}

.recipe-steps li::marker {
	color: var(--primary);
	font-weight: 800;
}

/* BOTTOM SHEET MODALS */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(43, 58, 65, 0.4);
	backdrop-filter: blur(4px);
	z-index: 100;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	transition: opacity 0.3s;
}

.modal.hidden {
	opacity: 0;
	pointer-events: none;
}

.modal-content {
	background: var(--surface);
	width: 100%;
	max-width: 600px;
	border-radius: 32px 32px 0 0;
	overflow: hidden;
	transform: translateY(0);
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
	padding-bottom: env(safe-area-inset-bottom, 1rem);
}

.modal.hidden .modal-content {
	transform: translateY(100%);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.8rem 1.8rem 1rem 1.8rem;
	color: var(--secondary);
}

.modal-header h2 {
	font-size: 1.3rem;
	font-weight: 800;
}

.btn-close {
	background: var(--bg-color);
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 1.2rem;
	cursor: pointer;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.btn-close:hover {
	background: var(--border-color);
	color: var(--secondary);
}

/* Menu d'actions (Ajouter) */
.action-list {
	padding: 0 1.5rem 2rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.action-btn {
	background: var(--bg-color);
	border: 2px solid transparent;
	padding: 1.2rem;
	border-radius: var(--radius-lg);
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--secondary);
	display: flex;
	align-items: center;
	gap: 1.2rem;
	cursor: pointer;
	transition: all 0.2s;
}

.action-btn:hover {
	background: var(--surface);
	border-color: var(--primary-light);
	box-shadow: var(--shadow-sm);
	transform: translateX(5px);
}

.action-btn .icon {
	font-size: 1.8rem;
	background: var(--surface);
	padding: 0.5rem;
	border-radius: 12px;
	box-shadow: var(--shadow-sm);
}

.photo-btn {
	position: relative;
	overflow: hidden;
}

.photo-btn input[type="file"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

/* Edit form */
.edit-form {
	padding: 0 1.5rem 2rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.styled-input {
	width: 100%;
	padding: 1.2rem;
	border-radius: 16px;
	border: 2px solid var(--bg-color);
	background: var(--bg-color);
	font-family: inherit;
	font-size: 1rem;
	color: var(--secondary);
	font-weight: 600;
	transition: all 0.2s;
}

.styled-input:focus {
	outline: none;
	border-color: var(--primary-light);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
}

.video-container {
	padding: 1rem;
	background: #000;
	border-radius: 0 0 32px 32px;
}

/* LOADER */
#loader {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4rem 0;
	color: var(--primary);
	font-weight: 700;
}

.spinner {
	width: 48px;
	height: 48px;
	border: 4px solid var(--primary-light);
	border-top: 4px solid var(--primary);
	border-radius: 50%;
	animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
	margin-bottom: 1.5rem;
}

.hidden {
	display: none !important;
}

/* ANIMATIONS */
@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideDownFade {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.notification {
	border-radius: 16px !important;
	box-shadow: var(--shadow-md) !important;
	font-family: 'Plus Jakarta Sans', sans-serif;
}