/* ═══════════════════════════════════════════════════════════════════════════
   style.css — Elsys Alternance Tracker
   Design : dark mode, glassmorphism, gradient indigo-violet-cyan
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
    /* Couleurs */
    --bg-base: #0f0f1a;
    --bg-surface: #13131f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-cyan: #06b6d4;
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    --gradient-text: linear-gradient(135deg, #818cf8, #a78bfa, #22d3ee);

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Typographie */
    --font-body: 'Inter', system-ui, sans-serif;
    --font-heading: 'Outfit', system-ui, sans-serif;

    /* Espacements */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Ombres */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.85;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.4rem;
}

.logo-accent {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badge "Surveillance active" */
.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ── Flash messages ───────────────────────────────────────────────────────── */
.flash-container {
    padding-top: 1rem;
}

.flash {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    animation: slide-down 0.3s ease;
}

.flash--error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.flash--success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hero Section ─────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 6rem 0 5rem;
    overflow: hidden;
    text-align: center;
}

/* Orbes de fond */
.hero-bg-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: orb-float 8s ease-in-out infinite;
}

.orb--1 {
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
    top: -150px;
    left: -100px;
    animation-delay: 0s;
}

.orb--2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    top: -50px;
    right: -100px;
    animation-delay: 2s;
}

.orb--3 {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

@keyframes orb-float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.orb--3 {
    animation-name: orb-float-center;
}

@keyframes orb-float-center {

    0%,
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    50% {
        transform: translateX(-50%) translateY(-20px) scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-subtitle strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── Formulaire d'inscription ─────────────────────────────────────────────── */
.subscribe-form {
    max-width: 520px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.6rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 0;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.85rem;
    text-align: center;
}

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    color: #fff;
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--outline {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.btn--outline:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.btn--sm {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
}

.btn--loading .btn-text {
    display: none;
}

.btn--loading .btn-icon {
    display: none;
}

.btn--loading .btn-loader {
    display: inline !important;
}

/* ── Stats Section ────────────────────────────────────────────────────────── */
.stats-section {
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-value--small {
    font-size: 1.2rem;
}

.stat-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ── Section commune ──────────────────────────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ── Offres Section ───────────────────────────────────────────────────────── */
.offers-section {
    padding: 3rem 0;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.offer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.offer-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.offer-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.offer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--alternance {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge--stage {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.badge--other {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge--location {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.offer-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.offer-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.offer-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.offer-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.offer-detected {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Empty State ──────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
    font-size: 0.9rem;
}

/* ── How it works ─────────────────────────────────────────────────────────── */
.how-section {
    padding: 4rem 0 5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.step-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.step-number {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(99, 102, 241, 0.12);
    line-height: 1;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Feedback pages (success, unsubscribe, already_subscribed) ────────────── */
.feedback-section {
    padding: 5rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.feedback-card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-card);
}

.feedback-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    display: block;
}

.feedback-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feedback-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.feedback-desc strong {
    color: var(--text-primary);
    font-weight: 600;
}

.feedback-info-box {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.feedback-info-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.feedback-info-box p+p {
    margin-top: 0.5rem;
}

.feedback-info-box--neutral {
    background: rgba(148, 163, 184, 0.06);
    border-color: var(--border);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: auto;
}

.footer-inner {
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.footer-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-legal {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

/* ── Animations d'entrée ──────────────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in--delay-1 {
    transition-delay: 0.1s;
}

.fade-in--delay-2 {
    transition-delay: 0.2s;
}

.fade-in--delay-3 {
    transition-delay: 0.3s;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 3.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .form-group {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .form-input {
        padding: 0.6rem 0.5rem;
    }

    .btn--primary {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .feedback-card {
        padding: 2rem 1.5rem;
    }

    .header-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }
}