/* ============================================
   GUE — Guichet Unique de l'Élevage
   Design System & Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #059669;
    --primary-light: #10B981;
    --primary-dark: #047857;
    --primary-900: #064E3B;
    --secondary: #D97706;
    --secondary-light: #F59E0B;
    --accent-blue: #2563EB;
    --accent-red: #DC2626;
    --accent-purple: #7C3AED;
    --accent-pink: #DB2777;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-main);
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* --- Top Bar --- */
.top-bar {
    background: var(--primary-900);
    color: var(--white);
    font-size: 0.8125rem;
    padding: 8px 0;
    position: relative;
    z-index: 1001;
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-left { display: flex; gap: 20px; align-items: center; }
.top-left span { display: flex; align-items: center; gap: 6px; }
.top-left i { color: var(--primary-light); }
.top-right { display: flex; gap: 12px; align-items: center; }
.lang-btn { padding: 3px 10px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); font-size: 0.75rem; }
.lang-btn.active { background: rgba(255,255,255,0.2); color: white; border-color: rgba(255,255,255,0.5); }
.admin-link { color: var(--primary-light); font-size: 0.8125rem; display: flex; align-items: center; gap: 5px; }
.admin-link:hover { color: white; }

/* --- Navbar --- */
.navbar {
    background: var(--white);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.navbar.scrolled { padding: 8px 0; box-shadow: var(--shadow-lg); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem;
}
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-size: 1.25rem; font-weight: 800; color: var(--primary-dark); letter-spacing: 2px; }
.logo-subtitle { font-size: 0.6875rem; color: var(--gray-500); letter-spacing: 0.5px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links li { position: relative; }
.nav-links li > a {
    display: flex; align-items: center; gap: 5px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    font-weight: 500; font-size: 0.9375rem; color: var(--gray-700);
}
.nav-links li > a:hover, .nav-links li > a.active { color: var(--primary); background: rgba(5, 150, 105, 0.06); }
.nav-links li > a.active { font-weight: 600; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: white; border-radius: var(--radius-md); box-shadow: var(--shadow-xl); border: 1px solid var(--gray-200); padding: 16px; z-index: 999; min-width: 580px; }
.dropdown-menu.mega { display: none; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dropdown:hover .dropdown-menu { display: grid; animation: fadeIn 0.25s ease; }
.mega-col h4 { font-size: 0.8125rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.mega-col h4 i { color: var(--primary); }
.mega-col a { display: block; padding: 8px 10px; font-size: 0.875rem; color: var(--gray-700); border-radius: 6px; }
.mega-col a:hover { background: var(--gray-50); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--gray-700); border-radius: 2px; transition: var(--transition); }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600;
    font-size: 0.9375rem; border: 2px solid transparent; cursor: pointer;
    transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(5,150,105,0.4); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline-white { background: transparent; color: white; border-color: rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: white; }
.btn-white { background: white; color: var(--primary); }
.btn-white:hover { background: var(--gray-50); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }
.btn-xs { padding: 6px 14px; font-size: 0.75rem; border-radius: 6px; }
.btn-primary-sm { background: var(--primary); color: white; padding: 8px 18px; font-size: 0.8125rem; border-radius: var(--radius-sm); border: 2px solid var(--primary); font-weight: 600; }
.btn-primary-sm:hover { background: var(--primary-dark); }
.btn-outline-sm { background: transparent; color: var(--primary); padding: 8px 18px; font-size: 0.8125rem; border-radius: var(--radius-sm); border: 2px solid var(--primary); font-weight: 600; }
.btn-outline-sm:hover { background: var(--primary); color: white; }

/* --- Hero Section --- */
.hero {
    position: relative; min-height: 92vh; display: flex; align-items: center;
    background: linear-gradient(135deg, var(--primary-900) 0%, #065F46 50%, #047857 100%);
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background: url('../images/gue_hero_slider_guinee.png') center center / cover no-repeat;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(6,78,59,0.75) 0%, rgba(4,120,87,0.65) 40%, rgba(6,95,70,0.55) 100%);
}
.hero-content {
    position: relative; z-index: 2;
    text-align: center; color: white;
    padding: 80px 0 40px;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 50px;
    padding: 8px 20px; font-size: 0.875rem; margin-bottom: 24px;
    color: rgba(255,255,255,0.9);
}
.hero-badge i { color: var(--secondary-light); }
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800; line-height: 1.15;
    margin-bottom: 20px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light), #FCD34D);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.125rem; max-width: 680px; margin: 0 auto 32px;
    color: rgba(255,255,255,0.85); line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats {
    display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
    padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat { text-align: center; }
.hero-stat-number { font-size: 2.5rem; font-weight: 800; color: var(--secondary-light); }
.hero-stat-label { font-size: 0.8125rem; color: rgba(255,255,255,0.7); margin-top: 4px; }
.hero-scroll { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2; }
.hero-scroll a { color: rgba(255,255,255,0.5); font-size: 1.5rem; animation: bounce 2s infinite; }

/* --- Section Headers --- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header.light { color: white; }
.section-header.light .section-desc { color: rgba(255,255,255,0.7); }
.section-badge {
    display: inline-block; padding: 6px 16px; border-radius: 50px;
    background: rgba(5,150,105,0.1); color: var(--primary); font-size: 0.8125rem;
    font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px;
}
.section-header.light .section-badge { background: rgba(255,255,255,0.15); color: var(--secondary-light); }
.section-title {
    font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700; line-height: 1.25; margin-bottom: 12px;
}
.section-desc { font-size: 1.0625rem; color: var(--gray-500); max-width: 600px; margin: 0 auto; }

/* --- Services Grid --- */
.services-section { padding: 80px 0; background: var(--gray-50); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
    background: white; border-radius: var(--radius-lg); padding: 32px;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0; transition: var(--transition);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: var(--primary-light); }
.service-card:hover::before { opacity: 1; }
.service-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.375rem; margin-bottom: 16px;
}
.service-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; color: var(--gray-900); }
.service-card p { font-size: 0.875rem; color: var(--gray-500); line-height: 1.6; margin-bottom: 14px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
    display: inline-block; padding: 4px 10px; border-radius: 50px;
    background: var(--gray-100); color: var(--gray-600); font-size: 0.6875rem;
    font-weight: 600; border: 1px solid var(--gray-200);
}
.service-link { font-size: 0.875rem; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.service-link:hover { gap: 10px; color: var(--primary-dark); }

/* --- How It Works --- */
.how-it-works {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-dark));
}
.steps-container { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.step-card {
    background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-lg);
    padding: 28px 24px; text-align: center; flex: 1; min-width: 180px; max-width: 240px;
    color: white; transition: var(--transition);
}
.step-card:hover { background: rgba(255,255,255,0.14); transform: translateY(-4px); }
.step-number { font-size: 2rem; font-weight: 900; color: var(--secondary-light); margin-bottom: 8px; }
.step-icon { font-size: 2rem; margin-bottom: 12px; color: var(--primary-light); }
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.step-card p { font-size: 0.8125rem; color: rgba(255,255,255,0.7); line-height: 1.5; }
.step-connector { color: var(--secondary-light); font-size: 1.25rem; }

/* --- Filieres --- */
.filieres-section { padding: 80px 0; background: var(--white); }
.filieres-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.filiere-card {
    background: white; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--gray-200); transition: var(--transition);
}
.filiere-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.filiere-img {
    height: 160px; position: relative; overflow: hidden;
}
.filiere-img img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    transition: transform 0.5s ease;
}
.filiere-card:hover .filiere-img img {
    transform: scale(1.08);
}
.filiere-img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.35) 100%);
}
.filiere-card h3 { padding: 16px 20px 0; font-size: 1.125rem; font-weight: 700; }
.filiere-card p { padding: 8px 20px; font-size: 0.8125rem; color: var(--gray-500); }
.filiere-count {
    display: inline-block; margin: 8px 20px 16px; padding: 4px 12px;
    border-radius: 50px; background: var(--gray-100); color: var(--primary);
    font-size: 0.75rem; font-weight: 600;
}

/* --- Catalogue Table --- */
.catalogue-section { padding: 80px 0; background: var(--gray-50); }
.catalogue-table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }
.catalogue-table { width: 100%; border-collapse: collapse; background: white; }
.catalogue-table th {
    background: var(--primary-900); color: white; padding: 14px 18px;
    font-size: 0.8125rem; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: 0.5px;
}
.catalogue-table td { padding: 12px 18px; font-size: 0.875rem; border-bottom: 1px solid var(--gray-100); }
.catalogue-table tr.family-header td {
    background: var(--gray-50); font-weight: 700; color: var(--primary-dark); font-size: 0.9375rem;
    padding: 14px 18px; border-bottom: 2px solid var(--primary-light);
}
.catalogue-table tr.family-header td i { margin-right: 8px; color: var(--primary); }
.catalogue-table tr.available { background: rgba(5,150,105,0.02); }
.catalogue-table tr:hover { background: rgba(5,150,105,0.04); }
.ref-badge {
    display: inline-block; width: 36px; height: 24px; line-height: 24px;
    text-align: center; border-radius: 6px; font-size: 0.6875rem;
    font-weight: 800; color: white;
}
.ref-badge.green { background: var(--primary); }
.ref-badge.orange { background: var(--secondary); }
.ref-badge.blue { background: var(--accent-blue); }
.status-badge {
    display: inline-block; padding: 4px 10px; border-radius: 50px;
    font-size: 0.6875rem; font-weight: 600;
}
.status-badge.active { background: rgba(16,185,129,0.1); color: var(--primary); }
.status-badge.pending { background: rgba(245,158,11,0.1); color: var(--secondary-dark, #B45309); }
.status-badge.new { background: rgba(37,99,235,0.1); color: var(--accent-blue); }

/* --- Workflow --- */
.workflow-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1F2937, #111827);
}
.workflow-visual { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.wf-step {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md); padding: 20px 16px; text-align: center;
    min-width: 120px; max-width: 150px; color: white; transition: var(--transition);
}
.wf-step:hover { background: rgba(255,255,255,0.12); transform: translateY(-4px); }
.wf-icon { font-size: 1.75rem; color: var(--primary-light); margin-bottom: 8px; }
.wf-label { display: block; font-weight: 700; font-size: 0.875rem; margin-bottom: 4px; }
.wf-desc { display: block; font-size: 0.6875rem; color: rgba(255,255,255,0.6); }
.wf-arrow { color: var(--secondary-light); font-size: 1.25rem; }

/* --- Recensement Highlight --- */
.recensement-highlight { padding: 80px 0; background: var(--white); }
.recensement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.recensement-info .section-badge { margin-bottom: 16px; }
.recensement-info h2 {
    font-family: var(--font-display); font-size: 2rem; font-weight: 700;
    color: var(--gray-900); margin-bottom: 16px; line-height: 1.3;
}
.recensement-info p { color: var(--gray-500); margin-bottom: 20px; line-height: 1.7; }
.feature-list { margin-bottom: 24px; }
.feature-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; font-size: 0.9375rem; color: var(--gray-700);
}
.feature-list li i { color: var(--primary); font-size: 1rem; }
.recensement-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.map-card {
    background: var(--gray-50); border-radius: var(--radius-lg); border: 1px solid var(--gray-200);
    overflow: hidden; box-shadow: var(--shadow-lg);
}
.map-header {
    padding: 14px 20px; font-weight: 600; color: var(--primary-dark);
    border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; gap: 8px;
}
.map-header i { color: var(--primary); }
.map-visual { padding: 20px; }
.map-placeholder {
    width: 100%; height: 200px; position: relative;
    background: linear-gradient(135deg, rgba(5,150,105,0.05), rgba(16,185,129,0.1));
    border-radius: var(--radius-md); border: 2px dashed var(--gray-300);
}
.map-dot {
    position: absolute; width: 12px; height: 12px;
    background: var(--primary); border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(5,150,105,0.3);
    animation: pulse 2s infinite;
}
.map-dot span {
    position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
    font-size: 0.6875rem; font-weight: 600; color: var(--primary-dark); white-space: nowrap;
}
.map-stats { display: flex; gap: 24px; padding: 16px 20px; border-top: 1px solid var(--gray-200); }
.map-stat { text-align: center; flex: 1; }
.map-stat-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.map-stat-label { font-size: 0.6875rem; color: var(--gray-500); }

/* --- RDV Highlight --- */
.rdv-highlight { padding: 80px 0; background: var(--gray-50); }
.rdv-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.rdv-feature {
    background: white; border-radius: var(--radius-md); padding: 24px;
    text-align: center; border: 1px solid var(--gray-200); transition: var(--transition);
}
.rdv-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-pink); }
.rdv-feature-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-pink), #F472B6);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.25rem; margin: 0 auto 12px;
}
.rdv-feature h4 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 6px; }
.rdv-feature p { font-size: 0.8125rem; color: var(--gray-500); line-height: 1.5; }
.rdv-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Suivi Section --- */
.suivi-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--accent-blue), #1D4ED8);
}
.suivi-box {
    background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-lg);
    padding: 32px; max-width: 700px; margin: 0 auto;
}
.suivi-input-group {
    display: flex; align-items: center; background: white;
    border-radius: var(--radius-md); overflow: hidden; margin-bottom: 16px;
}
.suivi-input-group i { padding: 0 16px; color: var(--gray-400); font-size: 1.25rem; }
.suivi-input {
    flex: 1; padding: 16px 0; border: none; outline: none;
    font-size: 1rem; font-family: var(--font-main); color: var(--gray-800);
}
.suivi-input-group .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 16px 24px; }
.suivi-channels { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.suivi-channel {
    display: flex; align-items: center; gap: 6px;
    color: rgba(255,255,255,0.8); font-size: 0.875rem;
}
.suivi-channel i { color: var(--secondary-light); }

/* --- Trust Section --- */
.trust-section { padding: 80px 0; background: var(--white); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trust-card {
    background: var(--gray-50); border-radius: var(--radius-md); padding: 28px;
    text-align: center; border: 1px solid var(--gray-200); transition: var(--transition);
}
.trust-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.trust-card i { font-size: 2rem; color: var(--primary); margin-bottom: 12px; display: block; }
.trust-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.trust-card p { font-size: 0.8125rem; color: var(--gray-500); line-height: 1.5; }

/* --- Partenaires --- */
.partenaires-section { padding: 60px 0; background: var(--gray-50); }
.partenaires-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.partenaire-card {
    background: white; border-radius: var(--radius-md); padding: 24px;
    text-align: center; border: 1px solid var(--gray-200); transition: var(--transition);
}
.partenaire-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.partenaire-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-900), var(--primary));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.25rem; margin: 0 auto 10px;
}
.partenaire-card span { font-weight: 700; font-size: 0.9375rem; display: block; margin-bottom: 4px; }
.partenaire-card small { font-size: 0.75rem; color: var(--gray-500); }

/* --- CTA Section --- */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-900), var(--primary));
}
.cta-content { text-align: center; color: white; }
.cta-content h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 12px; }
.cta-content p { color: rgba(255,255,255,0.8); margin-bottom: 24px; font-size: 1.0625rem; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Footer --- */
.footer {
    background: var(--gray-900); color: rgba(255,255,255,0.8); padding: 48px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .footer-logo i { font-size: 2rem; color: var(--primary-light); }
.footer-brand .footer-logo span { font-size: 1.5rem; font-weight: 800; color: white; letter-spacing: 2px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7); transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: white; }
.footer-col h4 { font-size: 0.9375rem; font-weight: 700; color: white; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 0.875rem; color: rgba(255,255,255,0.6); padding: 4px 0; }
.footer-col a:hover { color: var(--primary-light); }
.footer-col p { font-size: 0.875rem; display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.footer-col p i { color: var(--primary-light); margin-top: 4px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 0.8125rem; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: 0.8125rem; color: rgba(255,255,255,0.5); }
.footer-legal a:hover { color: var(--primary-light); }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(5,150,105,0.4); } 70% { box-shadow: 0 0 0 10px rgba(5,150,105,0); } 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); } }

/* --- Responsive --- */

/* Mobile navigation overlay close button */
.nav-close { display: none; position: absolute; top: 20px; right: 24px; background: none; border: none; font-size: 1.5rem; color: var(--gray-500); cursor: pointer; padding: 8px; z-index: 10001; min-width: 44px; min-height: 44px; }

/* Tablet and small desktop */
@media (max-width: 1024px) {
    .services-grid, .filieres-grid, .rdv-features, .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .partenaires-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .recensement-grid { grid-template-columns: 1fr; }
}

/* Mobile landscape and large phones */
@media (max-width: 768px) {
    /* Top bar hidden on mobile */
    .top-bar { display: none; }

    /* Container padding */
    .container { padding: 0 16px; }

    /* Navigation mobile overlay */
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: white;
        z-index: 9999;
        padding: 72px 24px 120px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav-links.open { display: flex; }
    .nav-close { display: flex; align-items: center; justify-content: center; }
    .nav-links li > a {
        padding: 16px 0;
        font-size: 1.125rem;
        border-bottom: 1px solid var(--gray-100);
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    .dropdown-menu, .dropdown-menu.mega {
        position: static;
        transform: none;
        min-width: 100%;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
        display: none;
        grid-template-columns: 1fr;
    }
    .dropdown.open .dropdown-menu { display: block; }
    .mega-col a { padding: 12px 10px; min-height: 44px; display: flex; align-items: center; }
    .hamburger { display: flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }

    /* Nav actions - hide text buttons, show hamburger */
    .nav-actions .btn-outline-sm, .nav-actions .btn-primary-sm { display: none; }
    .nav-actions { gap: 4px; }

    /* Hero responsive */
    .hero {
        min-height: 65vh;
        min-height: 65dvh;
    }
    .hero-bg {
        background-position: center 30%;
    }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(6,78,59,0.82) 0%, rgba(4,120,87,0.72) 40%, rgba(6,95,70,0.60) 100%);
    }
    .hero-content { padding: 48px 0 24px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 0.9375rem; padding: 0 8px; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn { width: 100%; max-width: 300px; }
    .hero-stats { gap: 12px; }
    .hero-stat-number { font-size: 1.5rem; }
    .hero-stat-label { font-size: 0.6875rem; }
    .hero-scroll { display: none; }

    /* Sections padding */
    .services-section, .filieres-section, .catalogue-section,
    .how-it-works, .workflow-section, .recensement-highlight,
    .rdv-highlight, .trust-section, .cta-section { padding: 48px 0; }

    /* Section headers */
    .section-header { margin-bottom: 32px; }
    .section-title { font-size: 1.5rem; }
    .section-desc { font-size: 0.9375rem; }

    /* Grids all single column */
    .services-grid, .filieres-grid, .rdv-features, .trust-grid { grid-template-columns: 1fr; }

    /* Filière cards on mobile */
    .filiere-img { height: 140px; }
    .filiere-card h3 { font-size: 1rem; padding: 12px 16px 0; }
    .filiere-card p { padding: 6px 16px; font-size: 0.8125rem; }
    .filiere-count { margin: 6px 16px 12px; }

    /* Service cards mobile */
    .service-card { padding: 20px; }
    .service-icon { width: 44px; height: 44px; min-width: 44px; border-radius: 10px; font-size: 1.125rem; }

    /* Steps and workflow vertical */
    .steps-container { flex-direction: column; gap: 8px; }
    .step-connector { transform: rotate(90deg); }
    .step-card { min-width: 100%; max-width: 100%; padding: 20px 16px; }
    .workflow-visual { flex-direction: column; gap: 4px; }
    .wf-step { min-width: 100%; max-width: 100%; padding: 16px 12px; }
    .wf-arrow { transform: rotate(90deg); }

    /* Recensement grid */
    .recensement-grid { grid-template-columns: 1fr; gap: 24px; }
    .recensement-info h2 { font-size: 1.5rem; }
    .feature-list li { padding: 6px 0; font-size: 0.875rem; }

    /* Catalogue table scrollable */
    .catalogue-table-wrapper { -webkit-overflow-scrolling: touch; }
    .catalogue-table { font-size: 0.75rem; }
    .catalogue-table th, .catalogue-table td { padding: 8px 10px; white-space: nowrap; }
    .ref-badge { width: 28px; height: 20px; line-height: 20px; font-size: 0.625rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom-inner { flex-direction: column; gap: 12px; text-align: center; }

    /* CTA section */
    .cta-content { padding: 32px 16px; }
    .cta-actions { flex-direction: column; align-items: center; }
    .cta-actions .btn { width: 100%; max-width: 280px; }

    /* Trust / Partenaires */
    .partenaires-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    /* Buttons touch-friendly */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 40px; }
    .btn-xs { min-height: 36px; }
    .btn-primary-sm, .btn-outline-sm { min-height: 40px; }
}

/* Small phones - iPhone SE, small Android */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    html { font-size: 15px; }

    /* Hero compact */
    .hero {
        min-height: 55vh;
        min-height: 55dvh;
    }
    .hero-bg {
        background-position: center 25%;
    }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(6,78,59,0.85) 0%, rgba(4,120,87,0.78) 40%, rgba(6,95,70,0.68) 100%);
    }
    .hero-content { padding: 36px 0 20px; }
    .hero-title { font-size: 1.625rem; }
    .hero-subtitle { font-size: 0.875rem; }
    .hero-stats { gap: 8px; }
    .hero-stat-number { font-size: 1.25rem; }
    .hero-stat-label { font-size: 0.625rem; }
    .hero-badge { font-size: 0.75rem; padding: 6px 14px; }

    /* Service cards extra compact */
    .service-card { padding: 16px; }
    .service-card h3 { font-size: 1rem; }
    .service-card p { font-size: 0.8125rem; }
    .tag { font-size: 0.625rem; padding: 3px 8px; }

    /* Filère images smaller */
    .filiere-img { height: 110px; }
    .filiere-card h3 { font-size: 0.9375rem; }
    .filiere-card p { font-size: 0.75rem; }

    /* Steps extra compact */
    .step-card { padding: 16px 12px; }
    .step-number { font-size: 1.5rem; }
    .step-icon { font-size: 1.5rem; }
    .step-card h3 { font-size: 0.875rem; }
    .step-card p { font-size: 0.75rem; }

    /* Map card */
    .map-placeholder { height: 150px; }
    .map-stats { gap: 12px; }
    .map-stat-num { font-size: 1.125rem; }

    /* Partenaires 2 cols minimum */
    .partenaires-grid { grid-template-columns: repeat(2, 1fr); }

    /* Buttons full width on very small screens */
    .hero-actions .btn { max-width: 100%; }
    .cta-actions .btn { max-width: 100%; }
}

/* Extra small - 320px iPhone SE 1st gen */
@media (max-width: 360px) {
    .container { padding: 0 10px; }
    html { font-size: 14px; }
    .hero-title { font-size: 1.5rem; }
    .filiere-img { height: 100px; }
    .partenaires-grid { grid-template-columns: 1fr; }
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
    .nav-links.open {
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
        padding-bottom: max(120px, env(safe-area-inset-bottom));
    }
    .cta-content {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    .footer {
        padding-bottom: max(32px, env(safe-area-inset-bottom));
    }
}

/* ============================================
   ADMIN DASHBOARD STYLES
   ============================================ */

/* --- Admin Layout --- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 280px; background: var(--gray-900); color: white;
    padding: 24px 0; position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto; z-index: 100;
}
.admin-sidebar .admin-logo { display: flex; align-items: center; gap: 12px; padding: 0 20px; margin-bottom: 32px; }
.admin-sidebar .admin-logo i { font-size: 1.5rem; color: var(--primary-light); }
.admin-sidebar .admin-logo span { font-weight: 800; font-size: 1.25rem; letter-spacing: 2px; }
.admin-sidebar .admin-logo small { display: block; font-size: 0.6875rem; color: rgba(255,255,255,0.5); letter-spacing: 0.5px; }
.admin-nav-section { padding: 0 16px; margin-bottom: 24px; }
.admin-nav-title { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.4); padding: 0 8px; margin-bottom: 8px; }
.admin-nav-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border-radius: var(--radius-sm); font-size: 0.875rem; color: rgba(255,255,255,0.7);
    transition: var(--transition); margin-bottom: 2px;
}
.admin-nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.admin-nav-item.active { background: var(--primary); color: white; font-weight: 600; }
.admin-nav-item i { width: 20px; text-align: center; font-size: 1rem; }
.admin-nav-item .badge-count {
    margin-left: auto; background: var(--accent-red); color: white;
    font-size: 0.6875rem; font-weight: 700; padding: 2px 8px; border-radius: 50px;
}
.admin-main { flex: 1; margin-left: 280px; background: var(--gray-50); }
.admin-topbar {
    background: white; padding: 16px 24px; display: flex;
    justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 50;
}
.admin-topbar-left { display: flex; align-items: center; gap: 16px; }
.admin-topbar-left h2 { font-size: 1.25rem; font-weight: 700; }
.admin-topbar-right { display: flex; align-items: center; gap: 16px; }
.admin-topbar-right .admin-notif {
    width: 40px; height: 40px; border-radius: 10px; background: var(--gray-100);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    position: relative; color: var(--gray-600);
}
.admin-topbar-right .admin-notif .notif-dot {
    position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
    background: var(--accent-red); border-radius: 50%;
}
.admin-topbar-right .admin-user {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px 6px 6px; border-radius: 50px;
    background: var(--gray-100); cursor: pointer;
}
.admin-user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: white; display: flex;
    align-items: center; justify-content: center; font-weight: 700; font-size: 0.8125rem;
}
.admin-user-info span { display: block; font-size: 0.8125rem; font-weight: 600; }
.admin-user-info small { font-size: 0.6875rem; color: var(--gray-500); }

.admin-content { padding: 24px; }

/* --- Admin Stats Cards --- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: white; border-radius: var(--radius-md); padding: 20px;
    border: 1px solid var(--gray-200); transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.stat-card-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: white;
}
.stat-card-change {
    font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 50px;
}
.stat-card-change.up { background: rgba(16,185,129,0.1); color: var(--primary); }
.stat-card-change.down { background: rgba(239,68,68,0.1); color: var(--accent-red); }
.stat-card-value { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.stat-card-label { font-size: 0.8125rem; color: var(--gray-500); }

/* --- Admin Tables --- */
.admin-table-card {
    background: white; border-radius: var(--radius-md); border: 1px solid var(--gray-200);
    margin-bottom: 24px; overflow: hidden;
}
.admin-table-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
}
.admin-table-header h3 { font-size: 1rem; font-weight: 700; }
.admin-table-header .table-filters { display: flex; gap: 8px; }
.admin-table-header .table-filter-btn {
    padding: 6px 14px; border-radius: 50px; font-size: 0.75rem;
    font-weight: 600; border: 1px solid var(--gray-200); background: white;
    cursor: pointer; transition: var(--transition);
}
.admin-table-header .table-filter-btn:hover, .admin-table-header .table-filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    padding: 12px 16px; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500);
    text-align: left; background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
.admin-table td { padding: 12px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--gray-100); }
.admin-table tr:hover td { background: rgba(5,150,105,0.02); }
.admin-table .status-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 600;
}
.status-pill.en-instruction { background: rgba(245,158,11,0.1); color: #B45309; }
.status-pill.en-instruction::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #F59E0B; }
.status-pill.valide { background: rgba(16,185,129,0.1); color: var(--primary); }
.status-pill.valide::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.status-pill.rejete { background: rgba(239,68,68,0.1); color: var(--accent-red); }
.status-pill.rejete::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-red); }
.status-pill.en-attente { background: rgba(37,99,235,0.1); color: var(--accent-blue); }
.status-pill.en-attente::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-blue); }
.admin-table .actions-cell { display: flex; gap: 6px; }
.admin-table .action-btn {
    width: 30px; height: 30px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--gray-200); background: white;
    cursor: pointer; font-size: 0.75rem; color: var(--gray-500);
    transition: var(--transition);
}
.admin-table .action-btn:hover { border-color: var(--primary); color: var(--primary); }
.admin-table .action-btn.danger:hover { border-color: var(--accent-red); color: var(--accent-red); }

/* --- Admin Chart Placeholder --- */
.admin-chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-card {
    background: white; border-radius: var(--radius-md); border: 1px solid var(--gray-200);
    padding: 20px; overflow: hidden;
}
.chart-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.chart-bar {
    display: flex; align-items: flex-end; gap: 8px; height: 200px; padding-top: 20px;
}
.chart-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.chart-bar-fill {
    width: 100%; border-radius: 6px 6px 0 0; min-height: 8px;
    transition: height 1s ease;
}
.chart-bar-label { font-size: 0.6875rem; color: var(--gray-500); text-align: center; }
.chart-bar-value { font-size: 0.6875rem; font-weight: 700; color: var(--gray-700); }

/* --- Donut Chart --- */
.donut-chart { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.donut-ring { width: 180px; height: 180px; border-radius: 50%; border: 24px solid var(--gray-200); position: relative; }
.donut-ring::before {
    content: ''; position: absolute; inset: -24px;
    border-radius: 50%; border: 24px solid var(--primary);
    clip-path: polygon(0 0, 50% 0, 50% 50%, 0 50%);
}
.donut-center {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center;
}
.donut-center .donut-value { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); }
.donut-center .donut-label { font-size: 0.6875rem; color: var(--gray-500); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; }
.donut-legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* --- Admin Responsive --- */
.admin-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.admin-overlay.show { display: block; }

.sidebar-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.25rem; color: var(--gray-700); padding: 8px; min-width: 44px; min-height: 44px; }

@media (max-width: 1024px) {
    .admin-sidebar {
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .admin-main { margin-left: 0 !important; }
    .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .chart-grid { grid-template-columns: 1fr !important; }
    .admin-table-card { margin-bottom: 16px; }
}

@media (max-width: 768px) {
    .admin-topbar { padding: 12px 16px; }
    .topbar-title { font-size: 1rem; }
    .topbar-right span { display: none; }
    .admin-content { padding: 16px; }
    .stat-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .stat-card { padding: 14px; display: flex; align-items: center; gap: 14px; }
    .stat-icon { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; }
    .stat-value { font-size: 1.25rem; }
    .stat-trend { font-size: 0.6875rem; }
    .admin-table-header { flex-direction: column; gap: 10px; align-items: stretch; padding: 12px 16px; }
    .admin-table-header h3 { font-size: 0.9375rem; }
    .table-filters { flex-wrap: wrap; gap: 6px; }
    .table-filter-btn { font-size: 0.6875rem; padding: 5px 10px; min-height: 36px; }
    .admin-table th, .admin-table td { padding: 8px 10px; font-size: 0.75rem; }
    .admin-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .chart-card { padding: 14px; }
    .chart-card h3 { font-size: 0.875rem; }
    .chart-bar { height: 140px; }
    .donut-chart { width: 140px; height: 140px; }
    .donut-ring { width: 140px; height: 140px; border-width: 18px; }
    .donut-value { font-size: 1.125rem; }
    .sidebar-link { padding: 12px 14px; min-height: 44px; font-size: 0.875rem; }
    .sidebar-header { padding: 14px 16px; }
    .sidebar-nav { padding: 0 10px; }
}

@media (max-width: 480px) {
    .admin-content { padding: 10px; }
    .stat-card { padding: 10px; gap: 10px; }
    .stat-value { font-size: 1rem; }
    .stat-label { font-size: 0.6875rem; }
    .chart-bar { height: 100px; }
    .chart-bar-label { font-size: 0.5625rem; }
    .chart-bar-value { font-size: 0.5625rem; }
    .admin-table th, .admin-table td { padding: 6px 8px; font-size: 0.6875rem; }
    .action-btn { width: 28px; height: 28px; font-size: 0.625rem; }
    .status-pill { font-size: 0.625rem; padding: 3px 8px; }
    .donut-chart { width: 120px; height: 120px; }
    .donut-ring { width: 120px; height: 120px; border-width: 14px; }
}



/* ============================================
   RESPONSIVE INLINE GRID FIXES
   ============================================ */

/* Grid utility classes to replace inline styles */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid-1fr1fr { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-stats-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2fr1fr { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.flex-center-wrap { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.flex-center-gap24 { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.info-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.steps-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }

/* Mobile overrides for grid utilities */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .grid-1fr1fr, .grid-2fr1fr, .grid-stats-2,
    .info-grid-3, .steps-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .flex-center-wrap, .flex-center-gap24 {
        flex-direction: column;
        align-items: center;
    }
    .flex-center-wrap > *, .flex-center-gap24 > * {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 1024px) {
    .grid-3, .grid-4, .info-grid-3, .steps-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4, .grid-1fr1fr, .grid-2fr1fr, .grid-stats-2,
    .info-grid-3, .steps-grid-3 {
        gap: 10px !important;
    }
}



/* ============================================
   DEEP RESPONSIVE FIXES
   ============================================ */

/* Info cards (3-column) responsive */
.info-card-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 768px) {
    .info-card-3 { grid-template-columns: 1fr !important; gap: 12px !important; }
    .info-card-3 > div { min-width: 0 !important; padding: 16px !important; }
}
@media (max-width: 1024px) and (min-width: 769px) {
    .info-card-3 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Feature steps (3-column) responsive */
.feature-steps-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}
@media (max-width: 768px) {
    .feature-steps-3 { grid-template-columns: 1fr !important; gap: 12px !important; }
    .feature-steps-3 > div { padding: 16px !important; }
}
@media (max-width: 1024px) and (min-width: 769px) {
    .feature-steps-3 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Card items inside grids - responsive padding and sizing */
@media (max-width: 768px) {
    /* All info/feature cards inside grids */
    .info-card-3 > div,
    .feature-steps-3 > div,
    .grid-3 > div,
    .grid-2 > div {
        padding: 16px !important;
        text-align: center !important;
        min-width: 0 !important;
    }
    
    /* Icon sizing mobile */
    .info-card-3 i,
    .feature-steps-3 i {
        font-size: 2rem !important;
    }
    
    /* Fix min-width items that overflow on mobile */
    [style*="min-width"] {
        min-width: auto !important;
    }
    
    /* Fix fixed-width items */
    [style*="width:"] {
        max-width: 100% !important;
    }
    
    /* Ensure all text content wraps */
    [style*="white-space:nowrap"] {
        white-space: normal !important;
    }
    
    /* Hero section map placeholder */
    .map-visual { padding: 16px !important; }
    .map-placeholder { height: 180px !important; }
    .map-stats { gap: 12px !important; padding: 12px 16px !important; flex-wrap: wrap !important; }
    .map-stat { min-width: 60px !important; }
    .map-stat-num { font-size: 1.25rem !important; }
    
    /* Vet section */
    .vet-features-section > div { min-width: 0 !important; }
    
    /* Contact info items */
    .contact-item { padding: 12px !important; }
    .contact-item i { font-size: 1.25rem !important; }
    
    /* Footer bottom on mobile */
    .footer-bottom { flex-direction: column !important; text-align: center !important; gap: 8px !important; }
    
    /* Procedure page info blocks */
    .procedure-info-block { padding: 16px !important; margin-bottom: 12px !important; }
    .procedure-info-block h4 { font-size: 0.9375rem !important; }
    
    /* Stats numbers on mobile */
    .stat-number-large { font-size: 1.5rem !important; }
    
    /* Region grid cards */
    .region-card { padding: 10px !important; }
    .region-card strong { font-size: 0.875rem !important; }
    
    /* Actualites articles */
    .article-meta { flex-direction: column !important; gap: 4px !important; }
    
    /* Buttons in procedure pages should be touch-friendly */
    .procedure-action { width: 100% !important; min-height: 44px !important; margin-bottom: 8px !important; }
    
    /* Import/Export tab content */
    .import-export-tabs { flex-direction: column !important; }
    .import-export-tab { width: 100% !important; min-height: 44px !important; }
    
    /* Connexion page */
    .auth-container { padding: 0 !important; }
    .auth-card { padding: 20px 16px !important; }
    .sms-ussd-grid { gap: 12px !important; }
    
    /* Recensement cards */
    .recensement-agent-card { padding: 16px !important; }
    .recensement-stat { padding: 12px !important; }
}

@media (max-width: 480px) {
    .info-card-3 > div,
    .feature-steps-3 > div {
        padding: 12px !important;
    }
    .map-placeholder { height: 140px !important; }
    .map-stat-num { font-size: 1rem !important; }
    .stat-number-large { font-size: 1.25rem !important; }
}



/* ============================================
   TABLE SCROLL WRAPPER (carte.html)
   ============================================ */
.table-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    border-radius: 8px;
}
.table-scroll-wrapper table {
    min-width: 500px;
}
.table-scroll-wrapper th,
.table-scroll-wrapper td {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .table-scroll-wrapper {
        margin: 0 -16px 16px -16px;
        padding: 0 8px;
    }
    .table-scroll-wrapper th,
    .table-scroll-wrapper td {
        padding: 8px 10px !important;
        font-size: 0.75rem !important;
    }
}



/* ============================================
   ADMIN CLASS ALIASES (HTML → CSS mapping)
   ============================================ */

/* sidebar-footer → matches footer inside admin-sidebar */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* sidebar-logo → matches admin-logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary-900);
    text-decoration: none;
}
.sidebar-logo img {
    height: 36px;
}

/* sidebar-title → matches admin-nav-title */
.sidebar-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    padding: 8px 20px 4px;
    margin-top: 8px;
}

/* stat-info → matches stat card info */
.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* topbar-left → matches admin-topbar-left */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-left .sidebar-toggle {
    display: none;
}

/* topbar-notif → matches admin-notif */
.topbar-notif {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.topbar-notif:hover {
    background: var(--gray-100);
}
.topbar-notif i {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* topbar-user → matches admin-user */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.topbar-user:hover {
    background: var(--gray-100);
}

/* user-avatar → matches admin-user-avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-700);
    font-weight: 600;
    font-size: 0.875rem;
}

/* notif-badge → notification badge */
.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* filter-btn → filter buttons in admin tables */
.filter-btn {
    padding: 6px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    font-size: 0.8125rem;
    cursor: pointer;
    background: white;
    color: var(--gray-600);
    transition: all 0.2s;
}
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* chart-bar-track → bar chart track */
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
}
.chart-bar-label {
    min-width: 80px;
    color: var(--gray-600);
    text-align: right;
}
.chart-bar-track {
    flex: 1;
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}
.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.8s ease;
}
.chart-bar-value {
    min-width: 40px;
    font-weight: 600;
    color: var(--gray-700);
}

/* donut chart styles */
.donut-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.donut-chart {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary) 0deg 130deg,
        var(--accent) 130deg 220deg,
        var(--warning) 220deg 290deg,
        var(--gray-200) 290deg 360deg
    );
}
.donut-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.donut-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
}
.donut-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray-600);
}
.donut-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ref-badge → reference badges in admin table */
.ref-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
}
.ref-badge.green { background: #dcfce7; color: #166534; }
.ref-badge.orange { background: #ffedd5; color: #9a3412; }
.ref-badge.blue { background: #dbeafe; color: #1e40af; }

/* ============================================
   ADMIN RESPONSIVE MOBILE FIXES
   ============================================ */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        height: 100dvh;
        width: 280px;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-sidebar.open {
        left: 0;
    }
    .admin-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .admin-overlay.active {
        display: block;
    }
    .topbar-left .sidebar-toggle {
        display: flex !important;
    }
    .admin-topbar {
        padding: 0 16px;
        height: 56px;
    }
    .admin-main {
        margin-left: 0 !important;
        padding: 16px !important;
    }
    .admin-content {
        padding: 0 !important;
    }
    .stat-grid,
    .grid-stats-2,
    .info-card-3 {
        grid-template-columns: 1fr !important;
    }
    .chart-bars {
        font-size: 0.75rem;
    }
    .chart-bar-label {
        min-width: 60px;
    }
    .donut-chart {
        width: 140px;
        height: 140px;
    }
    .donut-hole {
        width: 80px;
        height: 80px;
    }
    .donut-total {
        font-size: 1rem;
    }
    .admin-table th,
    .admin-table td {
        padding: 8px 10px !important;
        font-size: 0.75rem !important;
    }
    .admin-table {
        font-size: 0.75rem;
    }
    .filter-btn {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
    .notif-badge {
        width: 14px;
        height: 14px;
        font-size: 0.5rem;
        top: 2px;
        right: 2px;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 10px !important;
    }
    .donut-chart {
        width: 120px;
        height: 120px;
    }
    .donut-hole {
        width: 64px;
        height: 64px;
    }
    .chart-bar-item {
        font-size: 0.6875rem;
    }
}



/* ============================================
   BODY SCROLL LOCK (mobile nav open)
   ============================================ */
body.nav-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    touch-action: none;
}

/* ============================================
   PAGES SPECIFIQUES
   ============================================ */

/* --- Page Header (generic) --- */
.page-header {
    padding: 48px 0; background: linear-gradient(135deg, var(--primary-900), var(--primary-dark));
    color: white; text-align: center;
}
.page-header h1 { font-family: var(--font-display); font-size: 2.25rem; font-weight: 800; margin-bottom: 8px; }
.page-header p { font-size: 1.0625rem; color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto; }
.page-breadcrumb { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; font-size: 0.875rem; color: rgba(255,255,255,0.6); }
.page-breadcrumb a { color: rgba(255,255,255,0.7); }
.page-breadcrumb a:hover { color: white; }
.page-breadcrumb .sep::before { content: '/'; margin: 0 4px; }

/* --- Form Section --- */
.form-section { padding: 48px 0; }
.form-container { max-width: 860px; margin: 0 auto; }
.form-progress {
    display: flex; gap: 4px; margin-bottom: 32px;
}
.form-progress-step {
    flex: 1; height: 6px; border-radius: 3px;
    background: var(--gray-200); position: relative;
}
.form-progress-step.completed { background: var(--primary); }
.form-progress-step.current { background: var(--primary-light); }

.form-card {
    background: white; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200); padding: 32px;
    margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.form-card h3 {
    font-size: 1.125rem; font-weight: 700; margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px; color: var(--gray-900);
}
.form-card h3 i { color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.full { grid-template-columns: 1fr; }
.form-group { margin-bottom: 0; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label .required { color: var(--accent-red); }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm); font-size: 0.9375rem; font-family: var(--font-main);
    color: var(--gray-800); transition: var(--transition); background: white;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-hint { font-size: 0.75rem; color: var(--gray-400); margin-top: 4px; }
.file-upload {
    border: 2px dashed var(--gray-300); border-radius: var(--radius-md);
    padding: 24px; text-align: center; cursor: pointer; transition: var(--transition);
}
.file-upload:hover { border-color: var(--primary); background: rgba(5,150,105,0.02); }
.file-upload i { font-size: 2rem; color: var(--gray-400); margin-bottom: 8px; display: block; }
.file-upload p { font-size: 0.875rem; color: var(--gray-500); }
.file-upload span { font-size: 0.75rem; color: var(--primary); font-weight: 600; }

/* --- Vet Card --- */
.vet-card {
    background: white; border-radius: var(--radius-md); border: 1px solid var(--gray-200);
    padding: 20px; display: flex; gap: 16px; transition: var(--transition);
    margin-bottom: 12px;
}
.vet-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.vet-avatar {
    width: 64px; height: 64px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem; flex-shrink: 0;
}
.vet-info { flex: 1; }
.vet-info h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.vet-info .vet-specialite { font-size: 0.8125rem; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.vet-info .vet-address { font-size: 0.8125rem; color: var(--gray-500); }
.vet-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.vet-rating { display: flex; align-items: center; gap: 4px; font-size: 0.875rem; font-weight: 600; color: var(--secondary); }
.vet-rating i { font-size: 0.75rem; }

/* --- Search Bar --- */
.search-bar {
    display: flex; gap: 12px; margin-bottom: 24px;
    background: white; border-radius: var(--radius-md);
    border: 1px solid var(--gray-200); padding: 12px;
}
.search-bar input { flex: 1; border: none; outline: none; font-size: 1rem; font-family: var(--font-main); }
.search-bar .search-select { border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 0.875rem; }
.search-bar .search-btn { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }

/* --- Form Textarea --- */
.form-textarea {
    width: 100%; min-height: 120px; padding: 12px 16px;
    border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    font-size: 0.9375rem; font-family: var(--font-main);
    resize: vertical; transition: border-color 0.2s;
}
.form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,.1); }

/* --- Required Marker --- */
.required { color: var(--accent-red); font-weight: 600; }

/* --- Button Variants --- */
.btn-outline-white {
    background: transparent; color: white;
    border: 2px solid rgba(255,255,255,.4); font-weight: 600;
    transition: all 0.2s;
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); border-color: white; }
.btn-outline-sm {
    background: transparent; color: var(--primary);
    border: 2px solid var(--primary); font-weight: 600;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 0.875rem; cursor: pointer; transition: all 0.2s;
}
.btn-outline-sm:hover { background: var(--primary); color: white; }

/* --- Ref Badge Colors --- */
.ref-badge.blue { background: rgba(37,99,235,.1); color: var(--accent-blue); }
.ref-badge.orange { background: rgba(249,115,22,.1); color: #F97316; }
.ref-badge.green { background: rgba(5,150,105,.1); color: var(--primary); }

/* --- Status Badge Variants --- */
.status-badge.rejected { background: rgba(239,68,68,.1); color: var(--accent-red); }
.status-badge.pending { background: rgba(234,179,8,.1); color: var(--secondary-dark); }
.status-badge.active { background: rgba(5,150,105,.1); color: var(--primary); }

/* --- Admin Sections Toggle --- */
.admin-section { display: none; }
.admin-section:first-child { display: block; }

/* --- Responsive Fixes for Procedure Pages --- */
@media (max-width: 768px) {
    /* Page header compact */
    .page-header { padding: 32px 0; }
    .page-header h1 { font-size: 1.5rem; }
    .page-header p { font-size: 0.9375rem; }
    .page-breadcrumb { font-size: 0.75rem; flex-wrap: wrap; }

    /* Forms mobile */
    .form-section { padding: 24px 0; }
    .form-card { padding: 16px; }
    .form-card h3 { font-size: 1rem; margin-bottom: 14px; }
    .form-row { grid-template-columns: 1fr !important; }
    .form-input, .form-select, .form-textarea {
        padding: 12px 14px;
        font-size: 1rem; /* Prevents iOS zoom */
    }
    .form-select { min-height: 48px; }
    .form-label { font-size: 0.875rem; margin-bottom: 8px; }
    .file-upload { padding: 16px; }

    /* Search bar stacked */
    .search-bar { flex-direction: column; padding: 10px; gap: 8px; }
    .search-bar input { font-size: 1rem; min-height: 44px; }
    .search-bar .search-select { width: 100%; min-height: 44px; }
    .search-bar .search-btn { width: 100%; text-align: center; min-height: 44px; }

    /* Vet cards stacked */
    .vet-card { flex-direction: column; text-align: center; padding: 16px; }
    .vet-avatar { margin: 0 auto; width: 56px; height: 56px; }
    .vet-actions { align-items: center; flex-direction: row; justify-content: center; flex-wrap: wrap; }
    .vet-rating { justify-content: center; }

    /* Procedure cards / info blocks */
    .procedure-card, .info-block { padding: 16px; }

    /* RDV features stacked */
    .rdv-features { grid-template-columns: 1fr; }
    .rdv-feature { padding: 16px; }

    /* Buttons in procedure pages */
    .btn { min-height: 44px; width: 100%; }
    .btn-sm { width: auto; min-height: 40px; }
}

@media (max-width: 480px) {
    .page-header h1 { font-size: 1.25rem; }
    .page-header p { font-size: 0.875rem; }
    .form-card { padding: 12px; }
    .form-card h3 { font-size: 0.9375rem; }
}

/* Contact page mobile */
@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr !important; }
    .contact-info-card { padding: 16px; }
    .help-grid { grid-template-columns: 1fr !important; }
}

/* Actualites mobile */
@media (max-width: 768px) {
    .article-grid { grid-template-columns: 1fr !important; }
    .article-card { padding: 16px; }
    .article-card-img { height: 160px; }
}

/* Carte interactive mobile */
@media (max-width: 768px) {
    .region-grid { grid-template-columns: 1fr 1fr !important; }
    .region-card { padding: 12px; }
}
@media (max-width: 480px) {
    .region-grid { grid-template-columns: 1fr !important; }
}

/* Connexion page mobile */
@media (max-width: 768px) {
    .auth-container { max-width: 100% !important; padding: 0; }
    .auth-card { padding: 20px 16px; border-radius: 0; border: none; }
    .auth-tabs { flex-wrap: wrap; }
    .auth-tab { flex: 1; min-width: 0; padding: 12px 8px; font-size: 0.875rem; }
    .sms-ussd-grid { grid-template-columns: 1fr !important; }
}

/* Suivi dossier mobile */
@media (max-width: 768px) {
    .suivi-box { padding: 20px 16px; }
    .suivi-input-group { flex-direction: column; }
    .suivi-input { font-size: 1rem; min-height: 44px; }
    .suivi-input-group .btn { width: 100%; min-height: 44px; }
}



/* ============================================
   GLOBAL INLINE STYLE MOBILE OVERRIDE
   Forces all inline grid/flex layouts to single column on mobile
   ============================================ */
@media (max-width: 768px) {
    /* Any element with inline grid-template-columns becomes single column */
    [style*="grid-template-columns:repeat"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns:2fr"],
    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    /* Any element with inline min-width that causes overflow */
    [style*="min-width:160px"],
    [style*="min-width:200px"],
    [style*="min-width:240px"],
    [style*="min-width:580px"] {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    /* Inline flex with gap that might overflow */
    [style*="display:flex"][style*="gap:24px"],
    [style*="display:flex"][style*="gap:32px"] {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    /* Fix inline font sizes that are too big on mobile */
    [style*="font-size:2rem"],
    [style*="font-size:2.5rem"],
    [style*="font-size:3rem"],
    [style*="font-size:4rem"] {
        font-size: 1.5rem !important;
    }
    [style*="font-size:1.5rem"]:not(.btn):not(h1):not(h2):not(h3):not(h4) {
        font-size: 1.125rem !important;
    }
    /* Inline fixed heights */
    [style*="height:200px"],
    [style*="height:300px"] {
        height: auto !important;
        min-height: 120px !important;
    }
}

@media (max-width: 480px) {
    [style*="font-size:2rem"],
    [style*="font-size:1.5rem"] {
        font-size: 1.25rem !important;
    }
    [style*="padding:40px"],
    [style*="padding:32px"],
    [style*="padding:24px"] {
        padding: 16px !important;
    }
}

/* Print styles for certificates */
@media print {
    .navbar, .top-bar, .footer, .cta-section, .hero-scroll, .hamburger, .nav-close { display: none !important; }
    body { color: #000; background: #fff; }
    .certificate-container { box-shadow: none; border: 2px solid #000; }
}

/* ============================================
   iOS AUTO-ZOOM PREVENTION
   Prevents iOS from zooming when focusing inputs < 16px
   ============================================ */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="url"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        font-size: 1rem !important; /* 16px — prevents iOS auto-zoom */
        min-height: 44px;
    }
}

/* Ensure print certificate styles are clean */
@media print {
    .navbar, .footer, .top-bar, .hamburger, .nav-close,
    .btn-primary, .admin-sidebar, .admin-topbar { display: none !important; }
    body { background: white !important; color: black !important; }
    .certificate-container { 
        box-shadow: none !important; 
        margin: 0 !important;
        padding: 20px !important;
    }
}
