/* ============================================================
   ZTF MOBILE - Stylesheet Principal
   Mobile First | Humanitaire | Moderne
   ============================================================ */

:root {
    --blue-900: #1e3a5f;
    --blue-800: #1a4a7a;
    --blue-700: #1A56DB;
    --blue-600: #1c64f2;
    --blue-500: #3f83f8;
    --blue-400: #60a5fa;
    --blue-100: #dbeafe;
    --blue-50:  #eff6ff;

    --red-600:  #dc2626;
    --red-100:  #fee2e2;
    --orange-500: #f97316;
    --orange-100: #ffedd5;
    --green-600: #16a34a;
    --green-100: #dcfce7;

    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50:  #f9fafb;
    --white:    #ffffff;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'Plus Jakarta Sans', sans-serif;

    --shadow-sm:  0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.1);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  18px;
    --radius-xl:  24px;

    --transition: all .2s ease;
    --header-h:   64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: var(--transition);
}
.site-header.scrolled {
    box-shadow: var(--shadow-md);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo-icon { display: flex; align-items: center; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--blue-700); }
.logo-tagline { font-size: .65rem; color: var(--gray-500); letter-spacing: .04em; text-transform: uppercase; }

.main-nav {
    display: none;
    gap: 4px;
}
.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: .9rem;
    color: var(--gray-700);
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    background: var(--blue-50);
    color: var(--blue-700);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-sm);
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile nav */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
}
.nav-overlay.open { display: block; }

.main-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(280px, 80vw);
    background: var(--white);
    padding: 24px 16px;
    gap: 4px;
    z-index: 1001;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.main-content {
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 60%, #2563eb 100%);
    color: var(--white);
    padding: 60px 16px 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(96,165,250,.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}
.hero-badge span { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.4); } }

.hero h1 { margin-bottom: 16px; font-size: clamp(1.9rem, 6vw, 3.2rem); }
.hero h1 em { font-style: italic; color: var(--blue-400); }
.hero p { font-size: clamp(.95rem, 2.5vw, 1.15rem); opacity: .9; margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto; }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 16px;
    box-shadow: var(--shadow-sm);
}
.stats-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
}
.stat-item {}
.stat-num {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--blue-700);
    line-height: 1;
}
.stat-label {
    font-size: .75rem;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: 48px 16px;
}
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.section-header {
    margin-bottom: 32px;
}
.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--gray-600); max-width: 540px; }

.section-tag {
    display: inline-block;
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}

/* ============================================================
   CARDS
   ============================================================ */
.cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.case-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.case-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--blue-200, #bfdbfe);
}

.card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--gray-100);
}
.card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.case-card:hover .card-image img { transform: scale(1.04); }

.card-badge {
    position: absolute;
    top: 12px; left: 12px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    backdrop-filter: blur(8px);
}
.badge-critique { background: rgba(220,38,38,.85); color: white; }
.badge-urgent   { background: rgba(249,115,22,.85); color: white; }
.badge-normal   { background: rgba(26,86,219,.85);  color: white; }

.card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}
.card-location svg { flex-shrink: 0; }
.card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.3;
}
.card-desc {
    font-size: .875rem;
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-stats {
    display: flex;
    gap: 14px;
    padding: 12px 18px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}
.card-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    color: var(--gray-600);
    font-weight: 500;
}

.card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .875rem;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
    justify-content: center;
}
.btn-primary {
    background: var(--blue-700);
    color: var(--white);
}
.btn-primary:hover { background: var(--blue-600); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,86,219,.35); }

.btn-outline {
    background: transparent;
    color: var(--blue-700);
    border: 1.5px solid var(--blue-700);
}
.btn-outline:hover { background: var(--blue-50); }

.btn-white {
    background: var(--white);
    color: var(--blue-700);
}
.btn-white:hover { background: var(--blue-50); transform: translateY(-1px); }

.btn-ghost {
    background: var(--gray-100);
    color: var(--gray-700);
}
.btn-ghost:hover { background: var(--gray-200); }

.btn-heart {
    background: var(--red-100);
    color: var(--red-600);
    font-size: .8rem;
    padding: 7px 12px;
    flex: 1;
}
.btn-heart:hover, .btn-heart.active {
    background: var(--red-600);
    color: white;
}
.btn-comment {
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: .8rem;
    padding: 7px 12px;
    flex: 1;
}
.btn-comment:hover { background: var(--blue-100); }

.btn-donate {
    background: var(--green-100);
    color: var(--green-600);
    font-size: .8rem;
    padding: 7px 12px;
    flex: 1;
}
.btn-donate:hover { background: var(--green-600); color: white; }

.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ============================================================
   URGENCY SECTION
   ============================================================ */
.urgency-banner {
    background: linear-gradient(135deg, #7f1d1d 0%, var(--red-600) 100%);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.urgency-icon { font-size: 1.5rem; flex-shrink: 0; }
.urgency-text strong { display: block; font-size: .95rem; }
.urgency-text span { font-size: .8rem; opacity: .85; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-hero {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 24px 16px;
}
.detail-inner { max-width: 900px; margin: 0 auto; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: var(--gray-500);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--blue-600); }
.breadcrumb a:hover { text-decoration: underline; }

.detail-image-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--gray-100);
    margin-bottom: 24px;
    position: relative;
}
.detail-image-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--gray-600);
}

.detail-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-800);
    margin-bottom: 32px;
}

.action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 32px;
}
.action-bar .btn { flex: 1; min-width: 120px; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 24px;
}
.comments-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.comments-header h3 { font-size: 1rem; }
.comment-count { background: var(--blue-100); color: var(--blue-700); padding: 2px 8px; border-radius: 100px; font-size: .78rem; font-weight: 700; }

.comment-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    gap: 12px;
    animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.comment-item:last-child { border-bottom: none; }

.comment-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--blue-700);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.comment-content {}
.comment-author { font-weight: 600; font-size: .875rem; color: var(--gray-900); }
.comment-date   { font-size: .75rem; color: var(--gray-400); margin-left: 8px; }
.comment-text   { font-size: .875rem; color: var(--gray-700); margin-top: 4px; line-height: 1.5; }

.comments-load-more {
    text-align: center;
    padding: 16px;
    border-top: 1px solid var(--gray-100);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 24px;
}
.form-section-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}
.form-section-header h3 { font-size: 1rem; color: var(--gray-900); }
.form-body { padding: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.form-group label .required { color: var(--red-600); margin-left: 2px; }

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--gray-900);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.honeypot { display: none !important; }

.form-hint { font-size: .75rem; color: var(--gray-400); margin-top: 4px; }

/* Alert messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-success { background: var(--green-100); color: var(--green-600); border-left: 3px solid var(--green-600); }
.alert-error   { background: var(--red-100); color: var(--red-600); border-left: 3px solid var(--red-600); }
.alert-info    { background: var(--blue-50); color: var(--blue-700); border-left: 3px solid var(--blue-500); }

/* ============================================================
   DONATEURS PAGE
   ============================================================ */
.donors-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.donor-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.donor-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.donor-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.avatar-particulier { background: var(--blue-100); }
.avatar-entreprise  { background: var(--orange-100); }
.avatar-ong         { background: var(--green-100); }

.donor-info {}
.donor-name   { font-weight: 700; font-size: .95rem; color: var(--gray-900); }
.donor-type   { font-size: .75rem; color: var(--gray-500); text-transform: uppercase; font-weight: 600; letter-spacing: .04em; margin-bottom: 6px; }
.donor-type-badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: .7rem; font-weight: 700; }
.type-particulier { background: var(--blue-100); color: var(--blue-700); }
.type-entreprise  { background: var(--orange-100); color: #c2410c; }
.type-ong         { background: var(--green-100); color: var(--green-600); }
.donor-msg    { font-size: .85rem; color: var(--gray-600); line-height: 1.5; margin-top: 6px; font-style: italic; }
.donor-cas    { font-size: .75rem; color: var(--blue-600); margin-top: 6px; font-weight: 500; }

.gratitude-banner {
    background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
    color: white;
    padding: 48px 24px;
    border-radius: var(--radius-xl);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.gratitude-banner::before {
    content: '🙏';
    position: absolute;
    font-size: 8rem;
    opacity: .08;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
}
.gratitude-banner h2 { margin-bottom: 12px; }
.gratitude-banner p { opacity: .85; max-width: 480px; margin: 0 auto; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.contact-info { }
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 12px;
}
.contact-info-icon {
    width: 40px; height: 40px;
    background: var(--blue-50);
    color: var(--blue-700);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-info-text strong { display: block; font-size: .875rem; color: var(--gray-900); margin-bottom: 2px; }
.contact-info-text span   { font-size: .85rem; color: var(--gray-600); }

/* ============================================================
   INSCRIPTION MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.modal-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-size: 1.1rem; }
.modal-close {
    background: var(--gray-100);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--gray-600);
    transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 20px 24px 24px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 16px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    background: var(--white);
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
    transition: var(--transition);
    padding: 0 10px;
}
.page-btn:hover { border-color: var(--blue-500); color: var(--blue-700); }
.page-btn.active { background: var(--blue-700); border-color: var(--blue-700); color: white; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   SEARCH & FILTERS
   ============================================================ */
.search-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px;
    position: sticky;
    top: var(--header-h);
    z-index: 100;
}
.search-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.search-input-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.search-input-wrap svg {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}
.search-input-wrap input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    outline: none;
    transition: var(--transition);
}
.search-input-wrap input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.filter-select {
    padding: 10px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    background: var(--white);
    outline: none;
    cursor: pointer;
    color: var(--gray-700);
    transition: var(--transition);
}
.filter-select:focus { border-color: var(--blue-500); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 48px 16px 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-brand p { font-size: .875rem; line-height: 1.7; color: var(--gray-400); margin-top: 12px; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo span { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--white); }

.footer-links h4,
.footer-contact h4 {
    color: var(--white);
    font-size: .9rem;
    margin-bottom: 14px;
    font-family: var(--font-body);
    font-weight: 700;
}
.footer-links ul li { margin-bottom: 8px; }
.footer-links a { font-size: .875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--blue-400); }
.footer-contact p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    margin-bottom: 10px;
}
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    font-size: .8rem;
}
.footer-bottom p { margin-bottom: 4px; }
.footer-disclaimer { color: var(--gray-600); }

/* ============================================================
   ADMIN STYLES
   ============================================================ */
.admin-wrap {
    display: flex;
    min-height: 100vh;
    background: var(--gray-100);
}
.admin-sidebar {
    width: 240px;
    background: var(--blue-900);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform .25s ease;
}
.admin-sidebar.open { transform: none; }
.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; }
.sidebar-brand span { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    color: rgba(255,255,255,.75);
    transition: var(--transition);
    margin-bottom: 2px;
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255,255,255,.12);
    color: var(--white);
}
.sidebar-link svg { flex-shrink: 0; }

.admin-main {
    flex: 1;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.admin-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-toggle {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}
.admin-toggle span { display: block; width: 20px; height: 2px; background: var(--gray-700); border-radius: 2px; }

.admin-content { padding: 20px 16px; flex: 1; }

.admin-page-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.admin-stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.admin-stat-card .num {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--blue-700);
    line-height: 1;
    margin-bottom: 4px;
}
.admin-stat-card .label { font-size: .75rem; color: var(--gray-500); text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }

.data-table-wrap {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
.data-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
.data-table td {
    padding: 12px 16px;
    font-size: .875rem;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }

.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-actif    { background: var(--green-100); color: var(--green-600); }
.status-clos     { background: var(--gray-200); color: var(--gray-600); }
.status-en_attente { background: var(--orange-100); color: #c2410c; }
.status-nouveau  { background: var(--blue-100); color: var(--blue-700); }
.status-traite   { background: var(--green-100); color: var(--green-600); }
.status-spam     { background: var(--red-100); color: var(--red-600); }
.status-visible  { background: var(--green-100); color: var(--green-600); }

/* Admin overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 199;
}
.sidebar-overlay.open { display: block; }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--blue-600);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--gray-700); margin-bottom: 8px; font-size: 1.1rem; }
.empty-state p { font-size: .875rem; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 16px;
    left: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}
.toast {
    background: var(--gray-900);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    max-width: min(340px, 100%);
    pointer-events: auto;
    animation: toastIn .3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
}
.toast.success { background: #166534; border-left: 3px solid #4ade80; }
.toast.error   { background: #7f1d1d; border-left: 3px solid #f87171; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px); } }
.toast.hide { animation: toastOut .3s ease forwards; }

/* ============================================================
   RESPONSIVE — Tablet 640px+
   ============================================================ */
@media (min-width: 640px) {
    .cases-grid          { grid-template-columns: repeat(2, 1fr); }
    .donors-grid         { grid-template-columns: repeat(2, 1fr); }
    .admin-stats-grid    { grid-template-columns: repeat(4, 1fr); }
    .form-row            { grid-template-columns: repeat(2, 1fr); }
    .contact-grid        { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   RESPONSIVE — Desktop 1024px+
   ============================================================ */
@media (min-width: 1024px) {
    .main-nav  { display: flex; }
    .nav-toggle { display: none; }

    .cases-grid          { grid-template-columns: repeat(3, 1fr); }
    .donors-grid         { grid-template-columns: repeat(3, 1fr); }
    .footer-grid         { grid-template-columns: 2fr 1fr 1fr; }
    .contact-grid        { grid-template-columns: 1fr 2fr; }

    .admin-sidebar       { transform: none; }
    .admin-main          { margin-left: 240px; }
    .admin-toggle        { display: none; }
    .admin-sidebar.open  { transform: none; }
}

@media (min-width: 1280px) {
    .cases-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-muted  { color: var(--gray-500); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* Images placeholder */
.img-placeholder {
    background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-400);
}
.img-placeholder svg { opacity: .5; }

/* ============================================================
   RESPONSIVE FIX — À ajouter à la FIN de style.css
   Corrige le menu mobile + layout général
   ============================================================ */

/* ── Fix menu mobile ── */
.main-nav {
    display: none;
}
.main-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(280px, 82vw);
    background: var(--white);
    padding: 20px 12px;
    gap: 2px;
    z-index: 1001;
    box-shadow: -4px 0 24px rgba(0,0,0,.18);
    overflow-y: auto;
    animation: slideIn .22s ease;
    border-left: 1px solid var(--gray-200);
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Nav links en mobile : plus grands pour le toucher */
.main-nav.mobile-open .nav-link {
    padding: 12px 16px;
    font-size: .95rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    font-weight: 600;
}
.main-nav.mobile-open .nav-link:hover,
.main-nav.mobile-open .nav-link.active {
    background: var(--blue-50);
    color: var(--blue-700);
}

/* Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* Toggle visible sur mobile */
.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 1002;
    position: relative;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all .2s ease;
    transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Desktop : menu horizontal */
@media (min-width: 1024px) {
    .main-nav {
        display: flex !important;
        flex-direction: row;
        position: static;
        width: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        border: none;
        animation: none;
        overflow: visible;
        z-index: auto;
    }
    .nav-toggle { display: none !important; }
    .nav-overlay { display: none !important; }
}

/* ── Fix cases-grid responsive ── */
.cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
@media (min-width: 480px) {
    .cases-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .cases-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
    .cases-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Fix card-actions wrap sur petit mobile ── */
.card-actions {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--gray-100);
    flex-wrap: nowrap;
}
.card-actions .btn {
    flex: 1;
    font-size: .75rem;
    padding: 7px 6px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 360px) {
    .card-actions { flex-wrap: wrap; }
    .card-actions .btn { flex: none; width: 100%; }
}

/* ── Fix stats-bar responsive ── */
.stats-bar-inner {
    grid-template-columns: repeat(3,1fr);
}
@media (max-width: 360px) {
    .stats-bar-inner { grid-template-columns: 1fr; }
    .stat-item:not(:last-child)::after { display: none; }
    .stat-item {
        padding: 14px 8px;
        border-bottom: 1px solid var(--gray-200);
    }
}

/* ── Fix action-bar detail page ── */
.action-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
}
.action-bar .btn {
    flex: 1;
    min-width: 120px;
    font-size: .82rem;
}
@media (max-width: 400px) {
    .action-bar { flex-direction: column; }
    .action-bar .btn { width: 100%; min-width: 0; }
}

/* ── Fix section padding mobile ── */
@media (max-width: 480px) {
    .section { padding: 36px 14px; }
    .section-inner { padding: 0; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn { text-align: center; justify-content: center; }
}

/* ── Fix admin sidebar responsive ── */
@media (min-width: 1024px) {
    .admin-sidebar { transform: none; }
    .admin-main { margin-left: 240px; }
    .admin-toggle { display: none; }
}

/* ── Fix breadcrumb overflow ── */
.breadcrumb {
    flex-wrap: wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ── Fix footer grid ── */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 28px;
}
@media (min-width: 640px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ── Fix img overflow ── */
img { max-width: 100%; height: auto; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }