/**
 * Apermis Theme v2 — Design System
 * Variables, reset, base, layout, buttons, animations, utilities
 * Extracted from prototype style.css (2026-05-03)
 */

/* ============================================
   SELF-HOSTED FONTS
   ============================================ */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/playfair-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --success: #10b981;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

ul {
    list-style: none;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section--alt {
    background: var(--bg-alt);
}

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

.section-subtitle {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 650px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
    margin-top: 1rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn--primary {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

.btn--primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--accent {
    background: var(--accent);
    color: var(--text-white);
    border-color: var(--accent);
}

.btn--accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn--white {
    background: var(--text-white);
    color: var(--primary);
    border-color: var(--text-white);
}

.btn--white:hover {
    background: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: var(--text-white);
    border-color: rgba(255,255,255,0.5);
}

.btn--outline:hover {
    background: var(--text-white);
    color: var(--primary);
    border-color: var(--text-white);
    transform: translateY(-2px);
}

.btn--outline-dark {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn--outline-dark:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn--outline-white {
    background: transparent;
    color: var(--text-white);
    border-color: rgba(255,255,255,0.5);
}

.btn--outline-white:hover {
    background: rgba(255,255,255,0.15);
    color: var(--text-white);
    border-color: var(--text-white);
    transform: translateY(-2px);
}

.btn--large,
.btn--lg {
    padding: 1.1rem 2.5rem;
    font-size: 1.0625rem;
}

.btn--small {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-up.stagger-1 { transition-delay: 0.1s; }
.fade-up.stagger-2 { transition-delay: 0.2s; }
.fade-up.stagger-3 { transition-delay: 0.3s; }
.fade-up.stagger-4 { transition-delay: 0.4s; }

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes scrollDot {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* WordPress defaults */
.wp-block-image img {
    border-radius: var(--radius);
}

.entry-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
    margin: 1rem 0 1rem 1.5rem;
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

/* =============================================
   Skip link — accessibilité
   ============================================= */
.skip-link,
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 1rem 1.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--primary, #1a1a2e);
    color: #fff;
    font-size: 1rem;
    z-index: 100000;
    outline: 2px solid #fff;
}
