:root {
    --bg: #fdf6f9;
    --surface: #ffffff;
    --primary: #e5407a;
    --primary-hover: #d02f68;
    --secondary: #7c5cff;
    --accent: #ffb457;
    --text: #241a2b;
    --muted: #7a6b82;
    --border: #f0e4ec;
    --shadow: 0 20px 60px -20px rgba(124, 92, 255, 0.25);
    --radius: 22px;
}

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

html, body {
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* Fond décoratif */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 420px; height: 420px; background: #ffb0cf; top: -120px; left: -80px; }
.blob-2 { width: 380px; height: 380px; background: #b7a8ff; bottom: -100px; right: -60px; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: #ffd79a; top: 40%; left: 55%; animation-delay: -12s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.08); }
}

/* Card */
.card {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border);
}

.step {
    display: none;
    animation: fadeIn 0.5s ease;
}
.step.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffe1ed 0%, #e9e0ff 100%);
    color: var(--primary);
    margin-bottom: 22px;
}
.icon-wrap.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 8px;
}

.name { color: var(--primary); }

.subtitle {
    color: var(--muted);
    margin-bottom: 22px;
    font-size: 0.95rem;
}

.btn-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
    position: relative;
}

.btn {
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 34px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px -8px var(--primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover {
    color: var(--text);
    border-color: var(--muted);
}

.btn-full { width: 100%; margin-top: 24px; }

/* Bouton fuyant */
.dodger.moving {
    position: fixed;
    z-index: 999;
    transition: top 0.25s ease, left 0.25s ease;
    touch-action: manipulation;
    width: auto;
    max-width: none;
    padding: 14px 34px;
}

/* Étape 3 */
.date-input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 14px 16px;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: #faf5f8;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}
.date-input::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
.date-input::-webkit-calendar-picker-indicator { margin-left: auto; }
.date-input:focus { outline: none; border-color: var(--primary); }

.activities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.activity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px;
    background: #faf5f8;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    user-select: none;
}
.activity:hover { border-color: var(--secondary); }
.activity input { display: none; }
.check-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1.5px solid #d8c7d5;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.check-box svg { opacity: 0; transition: opacity 0.15s ease; }
.activity input:checked ~ .check-box {
    background: var(--primary);
    border-color: var(--primary);
}
.activity input:checked ~ .check-box svg { opacity: 1; }
.activity:has(input:checked) {
    border-color: var(--primary);
    background: #fff2f7;
}
.activity-label { font-weight: 500; font-size: 0.95rem; }

.error {
    color: var(--primary);
    font-size: 0.85rem;
    min-height: 1.2em;
    margin-top: 10px;
}

.final-msg {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 12px 0 20px;
}
.name-inline { color: var(--text); font-weight: 600; }
.signature { color: var(--primary); font-weight: 600; letter-spacing: 0.02em; }

@media (max-width: 600px) {
    body { padding: 12px; }
    .card { padding: 32px 20px; border-radius: 18px; }
    .icon-wrap { width: 72px; height: 72px; margin-bottom: 18px; }
    .icon-wrap svg { width: 44px; height: 44px; }
    h1 { font-size: 1.3rem; }
    .subtitle { font-size: 0.9rem; }
    .btn { padding: 14px 28px; font-size: 0.98rem; width: 100%; max-width: 220px; }
    .btn-row { flex-direction: column; align-items: center; gap: 10px; }
    .activities { grid-template-columns: 1fr; gap: 10px; }
    .activity { padding: 13px 14px; }
    .blob { filter: blur(50px); opacity: 0.4; }
    .blob-1 { width: 280px; height: 280px; }
    .blob-2 { width: 260px; height: 260px; }
    .blob-3 { width: 220px; height: 220px; }
    .final-msg { font-size: 0.98rem; }
}

/* Empêche le zoom auto iOS sur les inputs */
@supports (-webkit-touch-callout: none) {
    .date-input, input[type="password"] { font-size: 16px; }
}
