/* Variables CSS */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --secondary: #6366f1;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f9fafb;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

/* Container principal */
.ghh-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Barre de progression */
.ghh-progress-wrapper {
    background: white;
    padding: 24px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.progress-bar {
    height: 12px;
    border-radius: 9999px;
    background: var(--border);
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    margin: 0;
}

.current-step {
    color: var(--primary);
    font-weight: 700;
}

/* Formulaire */
.ghh-form {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header d'étape */
.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), #fff);
    border-radius: 50%;
    margin-bottom: 20px;
    color: var(--primary);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
}

.step-icon.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.step-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.step-description {
    font-size: 16px;
    color: var(--text-gray);
    margin: 0;
}

/* Groupes de formulaire */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Labels */
.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.label-icon {
    color: var(--primary);
    flex-shrink: 0;
}

/* Inputs & Selects */
.ghh-form input[type="text"],
.ghh-form input[type="email"],
.ghh-form input[type="tel"],
.ghh-form input[type="number"],
.ghh-form select,
.ghh-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-dark);
    transition: var(--transition);
    background: white;
}

.ghh-form input:focus,
.ghh-form select:focus,
.ghh-form textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
}

.ghh-form input::placeholder {
    color: #9ca3af;
}

.ghh-form input.error,
.ghh-form select.error {
    border-color: #ef4444;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 14px;
    margin-top: 6px;
}

/* Hint text */
.input-hint {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-gray);
}

/* Checkbox cards */
.checkbox-group {
    display: grid;
    gap: 16px;
}

.checkbox-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.checkbox-card.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    transition: var(--transition);
}

.checkbox-icon {
    font-size: 32px;
    line-height: 1;
}

.checkbox-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.checkbox-card input:checked + .checkbox-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.checkbox-card:not(.disabled):hover .checkbox-content {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.checkbox-card.disabled .checkbox-content {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Cartes de résumé */
.summary-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-bottom: 32px;
}

.summary-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.summary-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.summary-amount {
    font-size: 24px;
    color: var(--primary-dark);
    margin: 0 0 20px 0;
}

.summary-amount strong {
    font-size: 36px;
    font-weight: 800;
}

.summary-note {
    font-size: 14px;
    color: var(--text-gray);
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin: 0;
}

/* Grille des avantages */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.benefit-icon {
    font-size: 24px;
    flex-shrink: 0;
}

/* Étapes */
.step {
    display: none;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active {
    display: block;
}

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

/* Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    display: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
}

/* =================================
   ADMIN BACKEND STYLES - PRO VERSION
   ================================= */

/* Wrapper principal admin */
.ghh-admin-wrap {
    background: #f5f7fa !important;
    padding: 0 !important;
    margin: -20px -20px 0 -42px !important;
    min-height: 100vh;
}

/* Header titre */
.ghh-admin-wrap > h1 {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 !important;
    padding: 28px 40px !important;
    background: #ffffff !important;
    border-bottom: 2px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

/* Container des statistiques */
.ghh-stats-container {
    background: #ffffff !important;
    padding: 32px 40px 40px !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

/* Row des cartes stats */
.ghh-stats-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

/* Carte statistique */
.ghh-stat-card {
    display: inline-flex !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 12px !important;
    padding: 0 !important;
    min-width: 140px !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    
}

.ghh-stat-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.ghh-stat-card:hover::before {
    opacity: 1 !important;
}

.ghh-stat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4) !important;
}

.ghh-stat-card.active {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5) !important;
    border: 2px solid #fff !important;
}

/* Cartes colorées par statut */
.ghh-stat-card.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.ghh-stat-card.nouveau {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.ghh-stat-card.a-appeler {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.ghh-stat-card.a-rappeler {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

.ghh-stat-card.devis-envoye {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

.ghh-stat-card.termine {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.ghh-stat-card.abandonne {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* Lien dans la carte */
.ghh-stat-card a {
    text-decoration: none !important;
    color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px 20px !important;
    width: 100% !important;
    height: 100% !important;
}

/* Contenu de la carte */
.stat-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: center !important;
}

/* Icône */
.stat-icon {
    font-size: 36px !important;
    line-height: 1 !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)) !important;
}

/* Info conteneur */
.stat-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
}

/* Nombre */
.stat-number {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1 !important;
    margin: 0 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
}

/* Label */
.stat-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: rgba(255,255,255,0.95) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    margin: 0 !important;
}

/* Actions (bouton export) */
.ghh-actions {
    padding: 24px 40px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin: 0 !important;
}

.ghh-actions .button-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
    transition: all 0.2s ease !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

.ghh-actions .button-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

/* Table */
.ghh-table {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    margin: 0 !important;
}

.ghh-table thead th {
    background: #f8fafc !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    color: #64748b !important;
    padding: 16px 20px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
}

.ghh-table tbody td {
    padding: 18px 20px !important;
    font-size: 14px !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

.ghh-table tbody tr:hover {
    background: #f8fafc !important;
}

.ghh-table tbody tr:last-child td {
    border-bottom: none !important;
}

.ghh-table tbody td a {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.ghh-table tbody td a:hover {
    color: #2563eb !important;
    text-decoration: underline !important;
}

.ghh-table tbody td strong {
    font-weight: 700 !important;
    color: #10b981 !important;
}

/* Badges */
.ghh-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.ghh-badge.nouveau {
    background: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.ghh-badge.a-appeler {
    background: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.ghh-badge.a-rappeler {
    background: #f5f3ff !important;
    color: #5b21b6 !important;
    border: 1px solid #ddd6fe !important;
}

.ghh-badge.devis-envoye {
    background: #ecfeff !important;
    color: #155e75 !important;
    border: 1px solid #a5f3fc !important;
}

.ghh-badge.termine {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7 !important;
}

.ghh-badge.abandonne {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

/* Bouton Voir */
.ghh-table .button-small {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.ghh-table .button-small:hover {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

.ghh-table {
    background: white;
    border: none;
    box-shadow: none;
}

.ghh-table thead th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    border-top: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ghh-table tbody td {
    padding: 16px;
    font-size: 14px;
    color: #374151;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.ghh-table tbody tr:last-child td {
    border-bottom: none;
}

.ghh-table tbody tr:hover {
    background: #f9fafb;
}

.ghh-table tbody td a {
    color: #2563eb;
    text-decoration: none;
}

.ghh-table tbody td a:hover {
    text-decoration: underline;
}

.ghh-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ghh-badge.nouveau { background: #eff6ff; color: #1e40af; }
.ghh-badge.a-appeler { background: #fef3c7; color: #92400e; }
.ghh-badge.a-rappeler { background: #f3e8ff; color: #5b21b6; }
.ghh-badge.devis-envoye { background: #ecfeff; color: #155e75; }
.ghh-badge.termine { background: #d1fae5; color: #065f46; }
.ghh-badge.abandonne { background: #fee2e2; color: #991b1b; }

/* Lead Detail Page */
.ghh-lead-detail {
    background: #f9fafb;
    padding: 0;
    margin: -20px -20px 0 -42px;
}

.ghh-lead-detail h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.ghh-lead-detail > .button {
    margin: 20px 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    text-decoration: none;
}

.ghh-lead-detail > .button::before {
    content: "←";
    font-size: 16px;
}

.ghh-detail-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    padding: 24px 32px;
}

.detail-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.detail-card h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-table {
    width: 100%;
}

.detail-table th {
    text-align: left;
    padding: 12px 0;
    font-weight: 600;
    color: #6b7280;
    width: 40%;
    font-size: 13px;
}

.detail-table td {
    padding: 12px 0;
    color: #1f2937;
    font-size: 14px;
}

.detail-table tr {
    border-bottom: 1px solid #f3f4f6;
}

.detail-table tr:last-child {
    border-bottom: none;
}

.detail-table td a {
    color: #2563eb;
    text-decoration: none;
}

.detail-table td a:hover {
    text-decoration: underline;
}

.detail-card .form-group {
    margin-bottom: 20px;
}

.detail-card .form-group:last-of-type {
    margin-bottom: 24px;
}

.detail-card .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #374151;
    font-weight: 600;
}

.detail-card select.widefat,
.detail-card textarea.widefat {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.detail-card select.widefat:focus,
.detail-card textarea.widefat:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.detail-card .button-primary {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    background: #10b981;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.detail-card .button-primary:hover {
    background: #059669;
}

.detail-card hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

.detail-card .button-link-delete {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    border-radius: 6px;
    color: #dc2626;
    border: 1px solid #fecaca;
    background: #ffffff;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.detail-card .button-link-delete:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

/* Responsive */
@media (max-width: 1400px) {
    .ghh-stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .ghh-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .ghh-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ghh-container {
        margin: 20px auto;
        padding: 0 16px;
    }

    .ghh-form {
        padding: 24px 20px;
    }

    .ghh-progress-wrapper {
        padding: 20px;
    }

    .step-header h3 {
        font-size: 24px;
    }

    .step-icon {
        width: 64px;
        height: 64px;
    }

    .step-icon svg {
        width: 36px;
        height: 36px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }

    .summary-amount {
        font-size: 20px;
    }

    .summary-amount strong {
        font-size: 28px;
    }

    .checkbox-content {
        padding: 16px 20px;
    }

    .checkbox-icon {
        font-size: 28px;
    }

    .ghh-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .ghh-admin-wrap {
        margin: -20px -10px 0 -10px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .step-header h3 {
        font-size: 20px;
    }

    .step-description {
        font-size: 14px;
    }

    .summary-card {
        padding: 24px 20px;
    }

    .ghh-stats-row {
        grid-template-columns: 1fr;
    }
}