/* ============================================================
   MariageLink Niger — app.css
   Variables globales, typographie, composants réutilisables
   Complète Tailwind CDN
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&display=swap');

/* --- Variables --- */
:root {
    --or:         #D4AF37;
    --or-clair:   #F5E6A3;
    --or-fonce:   #A07D1C;
    --creme:      #FDF8F0;
    --creme-bord: #EDE0C8;
    --texte:      #1C1917;
    --texte-doux: #78716C;
    --blanc:      #FFFFFF;
    --ombre:      0 4px 24px rgba(212,175,55,.15);
    --ombre-md:   0 8px 40px rgba(212,175,55,.2);
    --radius:     1rem;
    --radius-sm:  .625rem;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--texte);
    background: var(--creme);
    -webkit-font-smoothing: antialiased;
}

/* --- Typographie --- */
h1, h2, h3, .font-display {
    font-family: 'Playfair Display', serif;
}

.text-or  { color: var(--or); }
.bg-or    { background-color: var(--or); }
.bg-creme { background-color: var(--creme); }

/* --- Boutons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: var(--or);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: .9rem;
    padding: .75rem 1.75rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
    box-shadow: 0 4px 16px rgba(212,175,55,.35);
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--or-fonce);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(212,175,55,.45);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: transparent;
    color: var(--or);
    border: 2px solid var(--or);
    font-weight: 600;
    font-size: .9rem;
    padding: .7rem 1.7rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--or);
    color: #fff;
}

/* --- Cards --- */
.card {
    background: var(--blanc);
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    padding: 1.5rem;
}

.card-or {
    background: linear-gradient(135deg, var(--or) 0%, var(--or-fonce) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* --- Inputs --- */
.input-or {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid var(--creme-bord);
    border-radius: var(--radius-sm);
    background: var(--blanc);
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    color: var(--texte);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.input-or:focus {
    border-color: var(--or);
    box-shadow: 0 0 0 3px rgba(212,175,55,.15);
}

.input-or::placeholder { color: #C4B89A; }

label.label-or {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--or-fonce);
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* --- Badge statut --- */
.badge {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 9999px;
    font-size: .72rem;
    font-weight: 600;
}

.badge-attente { background: #FEF3C7; color: #92400E; }
.badge-valide  { background: #D1FAE5; color: #065F46; }
.badge-rejete  { background: #FEE2E2; color: #991B1B; }
.badge-actif   { background: #D1FAE5; color: #065F46; }
.badge-suspendu{ background: #F3F4F6; color: #6B7280; }

/* --- Séparateur orné --- */
.divider-or {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--or);
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.divider-or::before,
.divider-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--creme-bord);
}

/* --- Countdown --- */
.cd-block {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 3.5rem;
}

.cd-num {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--or);
}

.cd-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--texte-doux);
    margin-top: .25rem;
}

.cd-sep {
    font-size: 1.5rem;
    color: var(--or);
    font-weight: 300;
    margin: 0 .25rem;
    align-self: flex-start;
    padding-top: .15rem;
}

/* --- Stepper inscription --- */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 0;
}

.step-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    border: 2px solid var(--creme-bord);
    background: var(--blanc);
    color: var(--texte-doux);
    transition: all .3s;
    position: relative;
    z-index: 1;
}

.step-dot.active {
    border-color: var(--or);
    background: var(--or);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(212,175,55,.2);
}

.step-dot.done {
    border-color: #10B981;
    background: #10B981;
    color: #fff;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--creme-bord);
    transition: background .3s;
}

.step-line.done { background: #10B981; }

/* --- Chat UI --- */
#chat-messages {
    height: 420px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-thumb { background: var(--creme-bord); border-radius: 4px; }

/* --- Map --- */
.leaflet-container { border-radius: var(--radius); }
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm) !important; }

/* --- Animations --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-or {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,.4); }
    50%       { box-shadow: 0 0 0 12px rgba(212,175,55,0); }
}

.fade-up { animation: fadeUp .5s ease both; }
.fade-up-1 { animation: fadeUp .5s .1s ease both; }
.fade-up-2 { animation: fadeUp .5s .2s ease both; }
.fade-up-3 { animation: fadeUp .5s .3s ease both; }

/* --- Motif décoratif fond --- */
.pattern-bg {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(212,175,55,.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212,175,55,.06) 0%, transparent 50%);
}

/* --- Scrollbar globale --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--creme); }
::-webkit-scrollbar-thumb { background: var(--creme-bord); border-radius: 6px; }

/* --- Mobile nav bottom --- */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--blanc);
    border-top: 1px solid var(--creme-bord);
    display: flex;
    z-index: 40;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}

.mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .6rem .25rem;
    font-size: .65rem;
    color: var(--texte-doux);
    text-decoration: none;
    gap: .2rem;
    transition: color .15s;
}

.mobile-nav a.active,
.mobile-nav a:hover { color: var(--or); }

.mobile-nav a span.icon { font-size: 1.25rem; }