@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Pinyon+Script&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-cream: #fdf6e9;
    --bg-cream-deep: #f5e6d3;
    --choco: #2b1d16;
    --choco-deep: #1a0d06;
    --choco-mid: #4a2918;
    --kente-orange: #d47a39;
    --kente-orange-bright: #ec8e36;
    --kente-blue: #1e4d8b;
    --kente-blue-bright: #2f6db8;
    --kente-gold: #e8b75a;
    --ivory: #ffffff;
    --ivory-warm: #faf3e3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--bg-cream);
    color: var(--choco);
    font-family: 'Outfit', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.font-script {
    font-family: 'Pinyon Script', cursive;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.font-serif-display {
    font-family: 'Cormorant Garamond', serif;
}

.kente-bg {
    background-color: var(--choco);
    background-image:
        repeating-linear-gradient(45deg, transparent 0 12px, rgba(217, 122, 44, 0.18) 12px 16px, transparent 16px 28px, rgba(30, 77, 139, 0.18) 28px 32px),
        repeating-linear-gradient(-45deg, transparent 0 14px, rgba(232, 183, 90, 0.1) 14px 18px);
}

.kente-border {
    background: repeating-linear-gradient(90deg, var(--kente-orange) 0 14px, var(--choco) 14px 18px, var(--kente-blue) 18px 30px, var(--kente-gold) 30px 34px, var(--choco) 34px 38px);
    height: 14px;
}

.kente-strip-v {
    background: repeating-linear-gradient(0deg, var(--kente-orange) 0 18px, var(--choco) 18px 22px, var(--kente-blue) 22px 36px, var(--kente-gold) 36px 40px, var(--choco) 40px 44px);
}

.paper-card {
    background-color: var(--ivory);
    box-shadow: 0 4px 20px rgba(42, 22, 12, 0.06);
    border: 1px solid rgba(42, 22, 12, 0.06);
    border-radius: 12px;
}

.kente-frame { display: flex; flex-direction: column; max-width: 100%; }
.kente-frame-body { display: flex; min-height: 0; }
.kente-frame-side { width: 12px; flex-shrink: 0; }
@media (min-width: 768px) { .kente-frame-side { width: 16px; } }
.kente-frame-content { flex: 1; min-width: 0; background: var(--choco-deep); }

.verse-frame {
    border: 1px solid rgba(232, 183, 90, 0.55);
    padding: 12px 16px;
    text-align: center;
}

.verse-frame p {
    margin: 0;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ivory-warm);
}

.countdown-cell {
    background: var(--ivory-warm);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    position: relative;
}

.countdown-cell .kente-border { height: 5px; }

.timeline-bullet {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--choco);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-bullet::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kente-orange);
}

.grain::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.divider-ornament {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--kente-orange);
}

.divider-ornament::before,
.divider-ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
}

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

.float-soft { animation: float 6s ease-in-out infinite; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fade-up 0.9s ease-out both; }

::selection {
    background: var(--kente-orange);
    color: var(--ivory);
}

.form-input {
    margin-top: 0.5rem;
    height: 3rem;
    width: 100%;
    padding: 0 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(43, 29, 22, 0.12);
    background: rgba(245, 230, 211, 0.5);
    color: var(--choco);
}

.form-input:focus {
    outline: none;
    border-color: var(--kente-orange);
    box-shadow: 0 0 0 2px rgba(212, 122, 57, 0.3);
}

.form-textarea {
    margin-top: 0.5rem;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgba(43, 29, 22, 0.12);
    background: rgba(245, 230, 211, 0.5);
    color: var(--choco);
    padding: 0.75rem 1rem;
    resize: none;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--kente-orange);
    box-shadow: 0 0 0 2px rgba(212, 122, 57, 0.4);
}

.form-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: var(--choco-mid);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: transform 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-choco { background: var(--choco); color: var(--ivory); }
.btn-kente { background: var(--kente-orange); color: var(--choco-deep); }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-oui { background: var(--kente-orange); color: white; }
.badge-non { background: var(--choco-mid); color: white; }
.badge-maybe { background: #b45309; color: white; }
.badge-sent { background: #16a34a; color: white; }
.badge-pending { border: 1px solid rgba(43, 29, 22, 0.2); color: var(--choco-mid); }

.flash-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    font-size: 0.875rem;
    font-weight: 500;
}

.flash-success { background: var(--choco); color: var(--ivory-warm); }
.flash-error { background: #dc2626; color: white; }

.hidden { display: none !important; }

/* --- Formulaire RSVP --- */
.rsvp-step { position: relative; }

.rsvp-step-label {
    margin: 0 0 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--kente-orange);
}

.rsvp-panel {
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(43, 29, 22, 0.1);
    background: rgba(245, 230, 211, 0.35);
}

.rsvp-choice-btn {
    cursor: pointer;
    background: transparent;
}

.rsvp-choice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(43, 29, 22, 0.08);
}

.rsvp-guest-choice[aria-pressed="true"] .rsvp-choice-icon {
    background: rgba(255, 255, 255, 0.25);
}

.rsvp-companion-panel {
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px dashed rgba(212, 122, 57, 0.45);
    background: rgba(255, 255, 255, 0.45);
}

.rsvp-person-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-top: 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--kente-orange);
    color: var(--ivory);
}

.calendar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    border: 1px solid rgba(43, 29, 22, 0.15);
    background: rgba(255, 255, 255, 0.6);
    color: var(--choco);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.calendar-btn:hover {
    border-color: var(--kente-orange);
    color: var(--kente-orange);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -12px rgba(42, 22, 12, 0.35);
}

.calendar-btn-block {
    flex-direction: column;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 0.5rem;
    min-height: 4.5rem;
    font-size: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.75);
}

.calendar-btn-block span {
    line-height: 1.2;
}

/* --- Écran succès RSVP --- */
.rsvp-success-card {
    border: 1px solid rgba(212, 122, 57, 0.15);
}

.rsvp-success-accent {
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--kente-orange) 0%,
        var(--kente-gold) 35%,
        var(--kente-blue) 70%,
        var(--kente-orange) 100%
    );
}

.rsvp-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background: rgba(212, 122, 57, 0.12);
    color: var(--kente-orange);
}

.rsvp-success-panel {
    padding: 1.25rem;
    border-radius: 0.875rem;
    border: 1px solid rgba(43, 29, 22, 0.08);
    background: rgba(245, 230, 211, 0.45);
}

.rsvp-success-panel-title {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--choco-mid);
    text-align: center;
}

.rsvp-success-participant {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(43, 29, 22, 0.06);
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
