/**
 * Styles du portail www.daunois.fr
 * Direction esthétique : luxury editorial — tons sombres, accents cuivrés
 * Typographie : Playfair Display (titres) + Outfit (corps)
 */

/* ========================================
   Reset & Variables
   ======================================== */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	/* Palette sombre par défaut */
	--bg-primary: #0c0b0f;
	--bg-secondary: #141318;
	--bg-card: #1a191f;
	--bg-card-hover: #201f26;

	--text-primary: #f0ece4;
	--text-secondary: #a09a8e;
	--text-muted: #6b6560;

	--accent: #cdaf7d;
	--accent-dim: rgba(205, 175, 125, 0.15);
	--accent-glow: rgba(205, 175, 125, 0.08);

	--wine: #8b3a4a;
	--wine-glow: rgba(139, 58, 74, 0.2);

	--garage: #4a6f8b;
	--garage-glow: rgba(74, 111, 139, 0.2);

	--order: #6b8b4a;
	--order-glow: rgba(107, 139, 74, 0.2);

	--tasting: #8b6f4a;
	--tasting-glow: rgba(139, 111, 74, 0.2);

	--border: rgba(255, 255, 255, 0.06);
	--radius: 16px;
	--radius-sm: 10px;

	--font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mode clair */
[data-theme="light"] {
	--bg-primary: #f5f1eb;
	--bg-secondary: #ece7df;
	--bg-card: #ffffff;
	--bg-card-hover: #faf8f5;

	--text-primary: #1a1815;
	--text-secondary: #5c5650;
	--text-muted: #8a847d;

	--accent: #9a7b4f;
	--accent-dim: rgba(154, 123, 79, 0.1);
	--accent-glow: rgba(154, 123, 79, 0.06);

	--wine: #7a2d3d;
	--wine-glow: rgba(122, 45, 61, 0.1);

	--garage: #3d5e78;
	--garage-glow: rgba(61, 94, 120, 0.1);

	--order: #5a7a3d;
	--order-glow: rgba(90, 122, 61, 0.1);

	--tasting: #7a5e3d;
	--tasting-glow: rgba(122, 94, 61, 0.1);

	--border: rgba(0, 0, 0, 0.08);
}

/* ========================================
   Base
   ======================================== */
html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-body);
	font-weight: 400;
	color: var(--text-primary);
	background: var(--bg-primary);
	line-height: 1.6;
	overflow-x: hidden;
	transition: background-color 0.4s ease, color 0.4s ease;
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--text-primary);
}

/* ========================================
   Canvas particules
   ======================================== */
#particles {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	pointer-events: none;
}

/* ========================================
   Bouton toggle dark/light mode
   ======================================== */
.theme-toggle {
	position: fixed;
	top: 1.5rem;
	right: 1.5rem;
	z-index: 100;
	width: 2.75rem;
	height: 2.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--border);
	cursor: pointer;
	background: var(--bg-card);
	backdrop-filter: blur(12px);
	transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, background-color 0.4s ease;
}

.theme-toggle:hover {
	transform: scale(1.1);
	border-color: var(--accent);
}

.theme-toggle .icon {
	width: 1.15rem;
	height: 1.15rem;
	color: var(--text-secondary);
	transition: color 0.3s ease;
}

.theme-toggle:hover .icon {
	color: var(--accent);
}

.theme-toggle .icon.hidden {
	display: none;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	text-align: center;
}

.hero-content {
	max-width: 680px;
}

.hero-label {
	font-family: var(--font-body);
	font-weight: 300;
	font-size: 0.95rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 1rem;
}

.hero-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(3.5rem, 10vw, 6.5rem);
	line-height: 1;
	color: var(--text-primary);
	margin-bottom: 1.5rem;
	letter-spacing: -0.02em;
}

.hero-title-d {
	color: var(--accent);
	font-style: italic;
}

.hero-title .dot {
	color: var(--accent);
}

.hero-subtitle {
	font-family: var(--font-body);
	font-weight: 300;
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	color: var(--text-secondary);
	max-width: 480px;
	margin: 0 auto;
}

/* Indicateur de scroll */
.scroll-hint {
	position: absolute;
	bottom: 2.5rem;
	left: 50%;
	transform: translateX(-50%);
}

.scroll-line {
	display: block;
	width: 1px;
	height: 48px;
	background: linear-gradient(to bottom, var(--accent), transparent);
	animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
	0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
	50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ========================================
   Services Section
   ======================================== */
.services {
	position: relative;
	z-index: 1;
	padding: 4rem 2rem 6rem;
	max-width: 1100px;
	margin: 0 auto;
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}

/* ========================================
   Cartes
   ======================================== */
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 2.25rem 2rem;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	text-decoration: none;
	color: var(--text-primary);
	overflow: hidden;
	transition:
		transform 0.4s var(--ease-out-expo),
		border-color 0.4s ease,
		background-color 0.4s ease,
		box-shadow 0.4s ease;
}

.card:hover {
	transform: translateY(-4px);
	background: var(--bg-card-hover);
	border-color: var(--accent-dim);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
	color: var(--text-primary);
}

/* Icône */
.card-icon {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-sm);
	margin-bottom: 1.5rem;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.card-icon svg {
	width: 32px;
	height: 32px;
}

/* Couleurs par carte */
.card-wine .card-icon {
	background: var(--wine-glow);
	color: var(--wine);
}
.card-wine:hover {
	border-color: rgba(139, 58, 74, 0.3);
}
.card-wine .card-glow {
	background: radial-gradient(circle at 20% 20%, var(--wine-glow), transparent 70%);
}

.card-garage .card-icon {
	background: var(--garage-glow);
	color: var(--garage);
}
.card-garage:hover {
	border-color: rgba(74, 111, 139, 0.3);
}
.card-garage .card-glow {
	background: radial-gradient(circle at 20% 20%, var(--garage-glow), transparent 70%);
}

.card-order .card-icon {
	background: var(--order-glow);
	color: var(--order);
}
.card-order:hover {
	border-color: rgba(107, 139, 74, 0.3);
}
.card-order .card-glow {
	background: radial-gradient(circle at 20% 20%, var(--order-glow), transparent 70%);
}

.card-tasting .card-icon {
	background: var(--tasting-glow);
	color: var(--tasting);
}
.card-tasting:hover {
	border-color: rgba(139, 111, 74, 0.3);
}
.card-tasting .card-glow {
	background: radial-gradient(circle at 20% 20%, var(--tasting-glow), transparent 70%);
}

/* Corps de la carte */
.card-body {
	flex: 1;
}

.card-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.35rem;
	margin-bottom: 0.5rem;
	letter-spacing: -0.01em;
	transition: color 0.3s ease;
}

.card-desc {
	font-size: 0.9rem;
	font-weight: 300;
	color: var(--text-secondary);
	line-height: 1.6;
	transition: color 0.3s ease;
}

/* Flèche */
.card-arrow {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-top: 1.5rem;
	color: var(--text-muted);
	transition: color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.card-arrow svg {
	width: 20px;
	height: 20px;
}

.card:hover .card-arrow {
	color: var(--accent);
	transform: translateX(6px);
}

/* Lueur de fond */
.card-glow {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: none;
	z-index: 0;
}

.card:hover .card-glow {
	opacity: 1;
}

.card > *:not(.card-glow) {
	position: relative;
	z-index: 1;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 2rem;
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 0.85rem;
	font-weight: 300;
	transition: border-color 0.4s ease;
}

.site-footer a {
	color: var(--text-secondary);
	transition: color 0.2s ease;
}

.site-footer a:hover {
	color: var(--accent);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
	.services-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.card {
		padding: 1.75rem 1.5rem;
	}

	.theme-toggle {
		top: 1rem;
		right: 1rem;
		width: 2.5rem;
		height: 2.5rem;
	}

	.hero-title {
		font-size: clamp(2.5rem, 12vw, 4rem);
	}
}

@media (max-width: 480px) {
	.services {
		padding: 2rem 1rem 4rem;
	}

	.card {
		padding: 1.5rem 1.25rem;
	}

	.card-icon {
		width: 48px;
		height: 48px;
		margin-bottom: 1rem;
	}

	.card-icon svg {
		width: 26px;
		height: 26px;
	}

	.card-title {
		font-size: 1.15rem;
	}
}

/* ========================================
   Respect préférences utilisateur
   ======================================== */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.scroll-line {
		animation: none;
		opacity: 0.5;
	}
}

/* ========================================
   Focus visible (accessibilité clavier)
   ======================================== */
.card:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.theme-toggle:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* ========================================
   Boutons d'action des cartes
   ======================================== */
.card-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.card-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
	font-weight: 500;
	font-family: var(--font-body);
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--bg-secondary);
	color: var(--text-secondary);
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
}

.card-btn svg {
	width: 16px;
	height: 16px;
}

.card-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-dim);
}

.card-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
	font-size: 0.85rem;
	font-weight: 300;
	margin-bottom: 2rem;
}

.breadcrumb a {
	color: var(--text-muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

.breadcrumb a:hover {
	color: var(--accent);
}

.breadcrumb-sep {
	color: var(--text-muted);
	margin: 0 0.5rem;
}

.breadcrumb span:last-child {
	color: var(--text-secondary);
}

/* ========================================
   Pages guide — conteneur
   ======================================== */
.guide-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 4rem 2rem 2rem;
}

/* ========================================
   Guide — en-tête
   ======================================== */
.guide-header {
	margin-bottom: 3rem;
}

.guide-header-top {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.guide-app-icon {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-sm);
	flex-shrink: 0;
}

.guide-app-icon svg {
	width: 32px;
	height: 32px;
}

.guide-app-icon-garage {
	background: var(--garage-glow);
	color: var(--garage);
}

.guide-header-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 2rem;
	color: var(--text-primary);
}

.guide-header-sub {
	color: var(--text-secondary);
	font-weight: 300;
}

.guide-header-desc {
	color: var(--text-secondary);
	font-weight: 300;
	max-width: 600px;
	line-height: 1.6;
}

/* ========================================
   Guide — grille des guides (vue d'ensemble)
   ======================================== */
.guide-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
	margin-bottom: 3rem;
}

.guide-card {
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	text-decoration: none;
	color: var(--text-primary);
	overflow: hidden;
	transition:
		transform 0.4s var(--ease-out-expo),
		border-color 0.4s ease,
		background-color 0.4s ease,
		box-shadow 0.4s ease;
}

.guide-card:hover {
	transform: translateY(-4px);
	background: var(--bg-card-hover);
	border-color: rgba(74, 111, 139, 0.3);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
	color: var(--text-primary);
}

.guide-card-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.15rem;
	margin-bottom: 0.5rem;
	transition: color 0.3s ease;
}

.guide-card-desc {
	font-size: 0.85rem;
	font-weight: 300;
	color: var(--text-secondary);
	line-height: 1.6;
	flex: 1;
}

.guide-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 1rem;
}

.guide-card-count {
	font-size: 0.75rem;
	color: var(--text-muted);
	font-weight: 300;
}

.guide-card-arrow {
	width: 20px;
	height: 20px;
	color: var(--text-muted);
	transition: color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.guide-card:hover .guide-card-arrow {
	color: var(--accent);
	transform: translateX(4px);
}

.guide-card:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* ========================================
   Guide — layout détail (sidebar + contenu)
   ======================================== */
.guide-layout {
	display: flex;
	gap: 3rem;
}

/* Sidebar */
.guide-nav {
	width: 200px;
	flex-shrink: 0;
}

.guide-nav-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--text-muted);
	margin-bottom: 1rem;
	padding: 0 0.75rem;
}

.guide-nav-list {
	list-style: none;
}

.guide-nav-list li {
	margin-bottom: 0.25rem;
}

.guide-nav-link {
	display: block;
	padding: 0.5rem 0.75rem;
	border-radius: var(--radius-sm);
	font-size: 0.85rem;
	font-weight: 300;
	color: var(--text-secondary);
	text-decoration: none;
	transition: all 0.2s ease;
}

.guide-nav-link:hover {
	color: var(--text-primary);
	background: var(--bg-card-hover);
}

.guide-nav-link.active {
	background: var(--accent-dim);
	color: var(--accent);
	font-weight: 500;
}

/* Contenu principal */
.guide-content {
	flex: 1;
	min-width: 0;
}

.guide-content-header {
	margin-bottom: 2.5rem;
}

.guide-content-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 2rem;
	color: var(--text-primary);
	margin-bottom: 0.75rem;
}

.guide-content-desc {
	color: var(--text-secondary);
	font-weight: 300;
	line-height: 1.6;
}

/* ========================================
   Étapes numérotées
   ======================================== */
.guide-steps {
	margin-bottom: 2rem;
}

.step-block {
	display: flex;
	gap: 1rem;
	margin-bottom: 2rem;
}

.step-block:last-child {
	margin-bottom: 0;
}

.step-number {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--accent-dim);
	color: var(--accent);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.1rem;
	flex-shrink: 0;
}

.step-body {
	flex: 1;
	padding-top: 0.25rem;
}

.step-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--text-primary);
	margin-bottom: 0.5rem;
}

.step-desc {
	color: var(--text-secondary);
	font-weight: 300;
	line-height: 1.6;
	margin-bottom: 0.75rem;
}

/* Image de capture d'écran */
.step-image {
	margin-bottom: 0.75rem;
	border-radius: var(--radius-sm);
	overflow: hidden;
	border: 1px solid var(--border);
}

.step-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Encadré info */
.step-info {
	display: flex;
	gap: 0.75rem;
	padding: 1rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--garage-glow);
	background: var(--garage-glow);
	margin-bottom: 0.75rem;
}

.step-info svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--garage);
	margin-top: 0.125rem;
}

.step-info p {
	font-size: 0.85rem;
	color: var(--text-secondary);
	line-height: 1.6;
}

/* Encadré attention */
.step-warning {
	display: flex;
	gap: 0.75rem;
	padding: 1rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--wine-glow);
	background: var(--wine-glow);
	margin-bottom: 0.75rem;
}

.step-warning svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--wine);
	margin-top: 0.125rem;
}

.step-warning p {
	font-size: 0.85rem;
	color: var(--text-secondary);
	line-height: 1.6;
}

/* ========================================
   Navigation précédent / suivant
   ======================================== */
.guide-prev-next {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border);
}

.guide-prev-next-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	font-weight: 300;
	color: var(--text-secondary);
	text-decoration: none;
	transition: color 0.2s ease;
}

.guide-prev-next-link:hover {
	color: var(--accent);
}

.guide-prev-next-link svg {
	width: 16px;
	height: 16px;
}

/* ========================================
   Responsive — guides
   ======================================== */
@media (max-width: 768px) {
	.guide-container {
		padding: 3rem 1.5rem 2rem;
	}

	.guide-grid {
		grid-template-columns: 1fr;
	}

	.guide-layout {
		flex-direction: column;
		gap: 2rem;
	}

	.guide-nav {
		width: 100%;
	}

	.guide-nav-list {
		display: flex;
		flex-wrap: wrap;
		gap: 0.25rem;
	}

	.guide-content-title {
		font-size: 1.5rem;
	}

	.guide-header-title {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.guide-container {
		padding: 2.5rem 1rem 1.5rem;
	}

	.step-block {
		flex-direction: column;
		gap: 0.5rem;
	}

	.step-number {
		width: 32px;
		height: 32px;
		font-size: 0.9rem;
	}
}
