:root {
    --bg: #f9f9fb;
    --text: #1a1a1a;
    --card: #ffffff;
    --accent: #a855f7;
    --border: #e5e7eb;
}

.dark {
    --bg: #111827;
    --text: #f9fafb;
    --card: #1f2937;
    --border: #374151;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}

hr {
    border: none;
    height: 1px;
    background: var(--border);
}

/* Layout */
.wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header { padding: 20px; }

.header {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.controls { display: flex; gap: 8px; }

/* Grid — 3 colonnes fixes */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    display: block;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
    transform: translateY(-2px);
}

.icon {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 8px;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
}

.visit {
    font-size: 0.8rem;
    color: var(--accent);
}

/* Socials */
.socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
    flex: 1;
    text-align: center;
    transition: all 0.2s;
    display: block;
}

.social:hover {
    border-color: var(--accent);
    background: rgba(168, 85, 247, 0.05);
}

/* Footer */
footer {
    max-width: 800px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    opacity: 0.6;
    font-size: 0.9rem;
    padding: 0 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; }
    .socials { flex-direction: column; }
}

/* État de départ — invisible et décalé vers le bas */
.wrap section,
.wrap > * {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délai progressif pour chaque section */
.wrap > *:nth-child(1) { animation-delay: 0.1s; }
.wrap > *:nth-child(2) { animation-delay: 0.25s; }
.wrap > *:nth-child(3) { animation-delay: 0.4s; }


.card {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.4s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.45s; }
.card:nth-child(2) { animation-delay: 0.55s; }
.card:nth-child(3) { animation-delay: 0.65s; }