/**
 * Résurgence Agency — Variables CSS & Styles de base
 *
 * Convention : --oneday-*
 * Source : /design/style-guide.md (DESIGN-01)
 * Intégration visuelle détaillée : FRONT-01 (Sprint 3)
 */

/* ─── Google Fonts (chargées via functions.php) ─── */

:root {
	/* ─── Couleurs principales ─── */
	--oneday-primary: #1B2050;
	--oneday-primary-light: #2D3561;
	--oneday-primary-dark: #12153A;
	--oneday-accent: #E8613C;
	--oneday-accent-hover: #D15432;
	--oneday-accent-light: #FFF0EB;
	--oneday-bg: #FAF8F5;
	--oneday-bg-alt: #F2EDE7;
	--oneday-text: #1D1D21;
	--oneday-text-secondary: #6B6B76;
	--oneday-text-muted: #9B9BA6;
	--oneday-green: #1A6B4E;
	--oneday-green-light: #E8F5EF;
	--oneday-error: #D94052;
	--oneday-error-light: #FDF2F3;
	--oneday-border: #E5E2DD;
	--oneday-white: #FFFFFF;

	/* ─── Dégradés ─── */
	--oneday-gradient-hero: linear-gradient(135deg, #1B2050 0%, #2D3561 100%);
	--oneday-gradient-cta: linear-gradient(135deg, #E8613C 0%, #D15432 100%);
	--oneday-gradient-subtle: linear-gradient(180deg, #FAF8F5 0%, #F2EDE7 100%);

	/* ─── Typographie ─── */
	--oneday-font-heading: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, sans-serif;
	--oneday-font-body: 'Inter', system-ui, -apple-system, sans-serif;
	--oneday-font-accent: 'Playfair Display', Georgia, serif;

	/* Échelle typographique */
	--oneday-text-display: clamp(2.5rem, 5vw, 4rem);
	--oneday-text-h1: clamp(2rem, 4vw, 3rem);
	--oneday-text-h2: clamp(1.5rem, 3.5vw, 2.25rem);
	--oneday-text-h3: clamp(1.125rem, 2.5vw, 1.5rem);
	--oneday-text-h4: clamp(1rem, 2vw, 1.25rem);
	--oneday-text-body: clamp(1rem, 1.5vw, 1.125rem);
	--oneday-text-body-lg: clamp(1.125rem, 1.8vw, 1.25rem);
	--oneday-text-small: 0.875rem;
	--oneday-text-xs: 0.75rem;
	--oneday-text-quote: clamp(1.25rem, 2.5vw, 1.75rem);

	/* ─── Espacement ─── */
	--oneday-space-1: 0.25rem;
	--oneday-space-2: 0.5rem;
	--oneday-space-3: 0.75rem;
	--oneday-space-4: 1rem;
	--oneday-space-5: 1.25rem;
	--oneday-space-6: 1.5rem;
	--oneday-space-8: 2rem;
	--oneday-space-10: 2.5rem;
	--oneday-space-12: 3rem;
	--oneday-space-16: 4rem;
	--oneday-space-20: 5rem;
	--oneday-space-24: 6rem;

	/* ─── Containers ─── */
	--oneday-container-sm: 640px;
	--oneday-container-md: 768px;
	--oneday-container-lg: 1024px;
	--oneday-container-xl: 1200px;
	--oneday-container-full: 1440px;

	/* ─── Ombres ─── */
	--oneday-shadow-sm: 0 1px 2px rgba(27, 32, 80, 0.05);
	--oneday-shadow-md: 0 2px 8px rgba(27, 32, 80, 0.08);
	--oneday-shadow-lg: 0 8px 24px rgba(27, 32, 80, 0.12);
	--oneday-shadow-xl: 0 16px 48px rgba(27, 32, 80, 0.16);

	/* ─── Border Radius ─── */
	--oneday-radius-sm: 4px;
	--oneday-radius-md: 8px;
	--oneday-radius-lg: 12px;
	--oneday-radius-xl: 16px;
	--oneday-radius-full: 9999px;

	/* ─── Transitions ─── */
	--oneday-duration-fast: 150ms;
	--oneday-duration-normal: 200ms;
	--oneday-duration-slow: 300ms;
	--oneday-duration-reveal: 500ms;
	--oneday-duration-counter: 1500ms;
	--oneday-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--oneday-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
	--oneday-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

	/* ─── Z-Index ─── */
	--oneday-z-base: 0;
	--oneday-z-dropdown: 10;
	--oneday-z-sticky: 20;
	--oneday-z-overlay: 30;
	--oneday-z-modal: 40;
	--oneday-z-toast: 50;
	--oneday-z-tooltip: 60;
}

/* ─── Base styles ─── */

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	background-color: var(--oneday-bg);
	color: var(--oneday-text);
	font-family: var(--oneday-font-body);
	font-size: var(--oneday-text-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

/* ─── Typography base ─── */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--oneday-font-heading);
	color: var(--oneday-text);
	margin: 0;
}

h1 {
	font-size: var(--oneday-text-h1);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

h2 {
	font-size: var(--oneday-text-h2);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

h3 {
	font-size: var(--oneday-text-h3);
	font-weight: 600;
	line-height: 1.3;
}

h4 {
	font-size: var(--oneday-text-h4);
	font-weight: 600;
	line-height: 1.3;
}

p {
	margin: 0;
	max-width: 70ch;
}

a {
	color: inherit;
	text-decoration-skip-ink: auto;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

button {
	font-family: inherit;
}

/* ─── Selection ─── */

::selection {
	background-color: var(--oneday-accent);
	color: var(--oneday-white);
}

/* ─── Accessibilité ─── */

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

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ─── Skip to content (accessibilité) ─── */

.oneday-skip-link {
	position: absolute;
	top: -100%;
	left: var(--oneday-space-4);
	z-index: calc(var(--oneday-z-tooltip) + 10);
	padding: var(--oneday-space-3) var(--oneday-space-6);
	background: var(--oneday-accent);
	color: var(--oneday-white);
	font-weight: 600;
	border-radius: var(--oneday-radius-md);
	text-decoration: none;
	transition: top var(--oneday-duration-fast) var(--oneday-ease-out);
}

.oneday-skip-link:focus {
	top: var(--oneday-space-4);
}

/* ─── Toast notification (formulaire) ─── */

.oneday-toast {
	position: fixed;
	top: var(--oneday-space-6);
	right: var(--oneday-space-6);
	z-index: var(--oneday-z-toast);
	max-width: 400px;
	padding: var(--oneday-space-4) var(--oneday-space-6);
	background: var(--oneday-white);
	border-radius: var(--oneday-radius-lg);
	box-shadow: var(--oneday-shadow-xl);
	transform: translateX(120%);
	transition: transform var(--oneday-duration-slow) var(--oneday-ease-out);
}

.oneday-toast.is-visible {
	transform: translateX(0);
}

.oneday-toast--success {
	border-left: 3px solid var(--oneday-green);
}

.oneday-toast--error {
	border-left: 3px solid var(--oneday-error);
}

@media (max-width: 639px) {
	.oneday-toast {
		top: var(--oneday-space-4);
		right: var(--oneday-space-4);
		left: var(--oneday-space-4);
		max-width: none;
	}
}
