<?php
defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'Avision_Page_Template' ) ) {
	require_once AVISION_PLUGIN_DIR . 'includes/class-avision-page-template.php';
}

$is_fr = function_exists( 'avi_get_current_lang' ) && avi_get_current_lang() === 'fr';

global $avi_meta_title, $avi_meta_desc, $avi_schema_json;
$avi_meta_title  = $is_fr
	? 'Plateforme de gestion de flotte pour agences SEO local — Avision'
	: 'Fleet Management Platform for Local SEO Agencies — Avision';
$avi_meta_desc   = $is_fr
	? 'Gérez toutes vos fiches clients 24/7. Actions groupées, tarification wholesale, Guardian Mode et Growth Radar pour 1 à 500+ établissements.'
	: 'Scale your agency. Protect your clients local presence 24/7. Wholesale pricing. Guardian Mode, Growth Radar, Fleet Dashboard.';
$avi_schema_json = array(
	'@context' => 'https://schema.org',
	'@type'    => 'WebSite',
	'name'     => 'Avision',
	'url'      => 'https://avision.org',
);

$hero = array(
	'badge'         => $is_fr ? '📍 Propulsé par AVI Intelligence' : '📍 Powered by AVI Intelligence',
	'title'         => $is_fr
		? 'La plateforme ultime de gestion de flotte<br>pour les <span class="avi-gradient-text">agences SEO local</span>'
		: 'The Ultimate Fleet Management<br>Platform for <span class="avi-gradient-text">Local SEO Agencies</span>',
	'subtitle'      => $is_fr
		? 'Protégez la présence locale de vos clients 24/7. Automatisez les actions groupées sur toute votre flotte. Passez à 500+ établissements sans embaucher.'
		: 'Protect your clients local presence 24/7. Automate bulk actions across your entire fleet. Scale to 500+ locations without adding headcount.',
	'cta_primary'   => array(
		'label' => $is_fr ? 'CONNEXION AGENCE / ACCÈS PARTENAIRE' : 'AGENCY LOGIN / PARTNER ACCESS',
		'url'   => home_url( '/connexion/' ),
	),
	'cta_secondary' => array(
		'label' => $is_fr ? 'Voir les tarifs wholesale →' : 'See Wholesale Pricing →',
		'url'   => $is_fr ? home_url( '/fr/tarifs-agences/' ) : home_url( '/agency-pricing/' ),
	),
	'align'         => 'center',
	'size'          => 'large',
	'glow'          => true,
);

Avision_Page_Template::render(
	'home',
	$hero,
	static function () use ( $is_fr ) {
		$url_pricing   = $is_fr ? home_url( '/fr/tarifs-agences/' ) : home_url( '/agency-pricing/' );
		$url_how       = $is_fr ? home_url( '/fr/comment-ca-marche/' ) : home_url( '/how-it-works/' );
		$url_security  = $is_fr ? home_url( '/fr/securite-api/' ) : home_url( '/api-security/' );
		$url_contact   = $is_fr ? home_url( '/fr/contact/' ) : home_url( '/contact/' );
		$url_audit     = home_url( '/local-audit/' );
		$agency_dash_img = esc_url( content_url( '/uploads/2026/05/agency-dashboard-052026.png' ) );
		?>
		<div class="avi-home-page">
			<style>
				.avi-home-page { background:#0A1628;color:#fff;font-family:inherit;line-height:1.65; }
				.avi-home-page * { box-sizing:border-box; }
				.avi-home-page__inner { max-width:1100px;margin:0 auto;padding:0 24px; }
				.avi-home-page__section { padding:56px 0; }
				.avi-home-page__section-title { margin:0 0 12px;font-size:1.85rem;font-weight:800;color:#fff;text-align:center; }
				.avi-home-page__section-sub { margin:0 auto 32px;max-width:720px;text-align:center;color:#94a3b8;font-size:1rem; }
				.avi-home-page__props { background:rgba(108,63,197,0.06);border-radius:12px;padding:32px 24px;margin-bottom:8px; }
				.avi-home-page__props-grid { display:flex;flex-wrap:wrap;gap:24px;justify-content:center; }
				.avi-home-page__prop { flex:1 1 200px;max-width:240px;text-align:center; }
				.avi-home-page__prop-icon { font-size:28px;margin-bottom:8px; }
				.avi-home-page__prop-text { font-size:14px;color:#cbd5e1;line-height:1.5; }
				.avi-home-page .avi-title-accent {
					background:linear-gradient(90deg,#A07BFF,#C8AAFF);
					-webkit-background-clip:text;
					-webkit-text-fill-color:transparent;
					background-clip:text;
				}
				.avi-home-page .avi-home-threat-grid {
					display:grid;
					grid-template-columns:repeat(3,1fr);
					gap:16px;
				}
				.avi-home-page__engine { padding:64px 0; }
				.avi-home-page__engine-badge { display:inline-flex;align-items:center;gap:8px;background:rgba(108,63,197,0.2);border:1px solid #6C3FC5;border-radius:999px;padding:8px 18px;font-weight:700;margin-bottom:16px; }
				.avi-home-page__engine-bar { color:#94a3b8;font-size:13px;margin-bottom:24px; }
				.avi-home-page__engine-desc { color:#cbd5e1;max-width:800px;margin:0 auto 24px;line-height:1.8; }
				.avi-home-page__bullets { list-style:none;margin:0;padding:0;max-width:640px;margin-left:auto;margin-right:auto;text-align:left; }
				.avi-home-page__bullets li { position:relative;padding:0 0 12px 22px;color:#cbd5e1;font-size:14px; }
				.avi-home-page__bullets li::before { content:"✦";position:absolute;left:0;color:#F59E0B;font-weight:700; }
				.avi-home-page__products-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:24px; }
				.avi-home-page__product-card { background:#0f1e35;border-radius:12px;padding:28px;display:flex;flex-direction:column; }
				.avi-home-page__product-icon { font-size:32px;margin-bottom:12px; }
				.avi-home-page__product-title { margin:0 0 12px;font-size:1.1rem;font-weight:800;color:#fff; }
				.avi-home-page__product-desc { margin:0 0 16px;color:#94a3b8;font-size:14px;line-height:1.7;flex:1; }
				.avi-home-page__product-cta { color:#6B9FE8;font-size:14px;font-weight:600;text-decoration:none; }
				.avi-home-page__split { display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:center; }
				.avi-home-page__split-img { background:#0f1e35;border-radius:12px;min-height:280px;display:flex;align-items:center;justify-content:center;position:relative;flex-direction:column;gap:12px; }
				.avi-home-page__live-badge { background:#1a3a1a;color:#4ade80;font-size:12px;font-weight:700;padding:6px 12px;border-radius:999px; }
				.avi-home-page__split-placeholder { color:#94a3b8;font-size:14px; }
				.avi-home-page__checklist { list-style:none;margin:20px 0;padding:0; }
				.avi-home-page__checklist li { padding:0 0 10px 26px;position:relative;color:#cbd5e1;font-size:14px; }
				.avi-home-page__checklist li::before { content:"✓";position:absolute;left:0;color:#4ade80;font-weight:700; }
				.avi-home-page__btn-row { display:flex;gap:12px;flex-wrap:wrap;margin-top:20px; }
				.avi-home-page__bulk { background:rgba(108,63,197,0.06);border-radius:16px;padding:40px 32px; }
				.avi-home-page__bulk-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:28px; }
				.avi-home-page__bulk-item h3 { margin:12px 0 8px;font-size:1rem;color:#fff; }
				.avi-home-page__bulk-item p { margin:0;color:#94a3b8;font-size:14px;line-height:1.65; }
				.avi-home-page__label-cards { display:grid;grid-template-columns:1fr 1fr;gap:24px; }
				.avi-home-page__label-card { border-radius:12px;padding:28px; }
				.avi-home-page__label-card--grey { border:1px solid #6C3FC5;background:#0f1e35; }
				.avi-home-page__label-card--white { border:1px solid #F59E0B;background:#0f1e35; }
				.avi-home-page__label-check { list-style:none;margin:16px 0 0;padding:0; }
				.avi-home-page__label-check li { padding:0 0 8px 22px;position:relative;color:#cbd5e1;font-size:14px; }
				.avi-home-page__label-check li::before { content:"✓";position:absolute;left:0;color:#4ade80; }
				.avi-home-page__report-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:24px; }
				.avi-home-page__report-item { background:#0f1e35;border-radius:12px;padding:24px; }
				.avi-home-page__report-item h3 { margin:8px 0;font-size:1rem;color:#fff; }
				.avi-home-page__report-item p { margin:0;color:#94a3b8;font-size:14px;line-height:1.65; }
				.avi-home-page__cta-banner { background:linear-gradient(135deg,rgba(108,63,197,0.35) 0%,#0A1628 100%);border-radius:16px;padding:48px 32px;text-align:center;margin:56px 0; }
				.avi-home-page__cta-banner h2 { margin:0 0 12px;font-size:1.75rem;color:#fff; }
				.avi-home-page__cta-banner p { margin:0 0 24px;color:#94a3b8; }
				.avi-home-page__security { text-align:center;padding:48px 0; }
				.avi-home-page__security p { max-width:700px;margin:16px auto 24px;color:#94a3b8;line-height:1.8; }
				.avi-home-page__b2c { text-align:center;padding:16px 0 48px;font-size:14px;color:#94a3b8; }
				.avi-home-page__b2c a { color:#6B9FE8;text-decoration:none; }
				.avi-home-page__badge-pill { display:inline-block;background:rgba(245,158,11,0.15);color:#F59E0B;font-size:11px;font-weight:700;padding:4px 10px;border-radius:999px;margin-bottom:12px; }
				.avi-home-page__agency-badge { display:inline-flex;background:rgba(108,63,197,0.2);color:#c4b5fd;padding:6px 14px;border-radius:999px;font-size:12px;font-weight:700;margin-bottom:16px; }
				@media (max-width:900px) {
					.avi-home-page .avi-home-threat-grid { grid-template-columns:1fr 1fr; }
				}
				@media (max-width:600px) {
					.avi-home-page .avi-home-threat-grid { grid-template-columns:1fr; }
				}
				@media (max-width:1024px) {
					.avi-home-page__products-grid,.avi-home-page__bulk-grid { grid-template-columns:1fr; }
					.avi-home-page__split,.avi-home-page__label-cards { grid-template-columns:1fr; }
				}
				@media (max-width:768px) {
					.avi-home-page__section { padding:40px 0; }
					.avi-home-page__section-title { font-size:1.5rem; }
					.avi-home-page__props-grid { flex-direction:column;align-items:center; }
					.avi-home-page__report-grid { grid-template-columns:1fr; }
				}
				@media (max-width:480px) {
					.avi-home-page__inner { padding:0 16px; }
					.avi-home-page__bulk,.avi-home-page__cta-banner { padding:28px 20px; }
				}
				.avi-home-page .avi-home-meet-grid {
					display:grid;
					grid-template-columns:minmax(220px,280px) 1fr;
					gap:40px;
					align-items:start;
					margin-bottom:8px;
				}
				@media (max-width:800px) {
					.avi-home-page .avi-home-meet-grid {
						grid-template-columns:1fr;
						text-align:center;
					}
				}
				.avi-home-page .avi-home-meet-avatar-wrap {
					display:flex;
					flex-direction:column;
					align-items:center;
					gap:8px;
				}
				.avi-home-page .avi-home-meet-avatar-img {
					width:100px;
					height:100px;
					border-radius:50%;
					border:2px solid rgba(160,123,255,0.50);
					object-fit:cover;
				}
				.avi-home-page .avi-home-meet-name {
					font-size:1.1rem;
					font-weight:900;
					color:#fff;
				}
				.avi-home-page .avi-home-meet-role {
					font-size:0.78rem;
					color:rgba(255,255,255,0.40);
					text-align:center;
					line-height:1.4;
				}
				.avi-home-page .avi-home-meet-status {
					display:flex;
					align-items:center;
					gap:6px;
					font-size:0.75rem;
					color:#1DB88A;
					font-weight:600;
				}
				.avi-home-page .avi-home-meet-dot {
					width:7px;
					height:7px;
					border-radius:50%;
					background:#1DB88A;
					animation:avi-home-meet-pulse 2.5s ease-in-out infinite;
				}
				@keyframes avi-home-meet-pulse {
					0%, 100% { opacity:1; transform:scale(1); }
					50% { opacity:0.4; transform:scale(0.7); }
				}
				.avi-home-page .avi-home-meet-training {
					display:flex;
					flex-direction:column;
					align-items:center;
					gap:6px;
					margin-top:10px;
					width:100%;
				}
				.avi-home-page .avi-home-meet-training-bar {
					width:100%;
					height:4px;
					background:rgba(255,255,255,0.08);
					border-radius:4px;
					overflow:hidden;
				}
				.avi-home-page .avi-home-meet-training-fill {
					height:100%;
					width:80%;
					background:linear-gradient(90deg,#7C5CEF,#1DB88A);
					border-radius:4px;
					animation:avi-home-training-breathe 3s ease-in-out infinite;
				}
				@keyframes avi-home-training-breathe {
					0%, 100% { opacity:1; width:80%; }
					50% { opacity:0.7; width:86%; }
				}
				.avi-home-page .avi-home-meet-training-label {
					font-size:0.68rem;
					color:rgba(255,255,255,0.30);
					text-align:center;
					letter-spacing:0.04em;
					line-height:1.4;
				}
				.avi-home-page .avi-home-meet-training-status {
					display:inline-flex;
					align-items:center;
					gap:5px;
					font-size:0.72rem;
					font-weight:700;
					color:#A07BFF;
					background:rgba(124,92,239,0.10);
					border:1px solid rgba(124,92,239,0.25);
					border-radius:20px;
					padding:3px 10px;
				}
				.avi-home-page .avi-home-meet-training-dot {
					width:6px;
					height:6px;
					border-radius:50%;
					background:#A07BFF;
					flex-shrink:0;
					animation:avi-home-meet-pulse 1.8s ease-in-out infinite;
				}
				.avi-home-page .avi-home-meet-body h2 {
					font-size:1.65rem;
					font-weight:900;
					color:#fff;
					margin:0 0 14px;
					line-height:1.2;
					text-align:left;
				}
				@media (max-width:800px) {
					.avi-home-page .avi-home-meet-body h2 {
						text-align:center;
					}
				}
				.avi-home-page .avi-home-meet-lead {
					font-size:0.93rem;
					color:rgba(255,255,255,0.55);
					line-height:1.7;
					margin:0 0 18px;
				}
				.avi-home-page .avi-home-meet-list {
					list-style:none;
					padding:0;
					margin:0 0 22px;
				}
				.avi-home-page .avi-home-meet-list li {
					position:relative;
					padding-left:22px;
					margin-bottom:12px;
					font-size:0.88rem;
					color:rgba(255,255,255,0.72);
					line-height:1.55;
				}
				.avi-home-page .avi-home-meet-list li::before {
					content:'✓';
					position:absolute;
					left:0;
					color:#1DB88A;
					font-weight:700;
				}
			</style>

			<!-- SECTION 1 — Value props -->
			<section class="avi-home-page__section">
				<div class="avi-home-page__inner">
					<div class="avi-home-page__props">
						<div class="avi-home-page__props-grid">
							<div class="avi-home-page__prop">
								<div class="avi-home-page__prop-icon">🛡</div>
								<div class="avi-home-page__prop-text"><?php echo esc_html( $is_fr ? 'Chaque client protégé — sans recruter' : 'Every client protected — without adding headcount' ); ?></div>
							</div>
							<div class="avi-home-page__prop">
								<div class="avi-home-page__prop-icon">⚡</div>
								<div class="avi-home-page__prop-text"><?php echo esc_html( $is_fr ? 'Gérez 500 établissements sans agrandir votre équipe' : 'Scale to 500 locations without scaling your team' ); ?></div>
							</div>
							<div class="avi-home-page__prop">
								<div class="avi-home-page__prop-icon">💰</div>
								<div class="avi-home-page__prop-text"><?php echo esc_html( $is_fr ? 'Tarification wholesale qui évolue avec votre portefeuille' : 'Wholesale pricing that grows with your portfolio' ); ?></div>
							</div>
							<div class="avi-home-page__prop">
								<div class="avi-home-page__prop-icon">✦</div>
								<div class="avi-home-page__prop-text"><?php echo esc_html( $is_fr ? 'Prouvez votre valeur — chaque client voit son score progresser' : 'Prove your value — every client sees their score improve' ); ?></div>
							</div>
						</div>
					</div>
				</div>
			</section>

			<!-- SECTION 2 — Pain points -->
			<section class="avi-home-page__section">
				<div class="avi-home-page__inner">
					<div class="avi-section-head" style="text-align:center;margin-bottom:40px;">
						<h2 style="font-size:1.65rem;font-weight:900;color:#fff;margin:0 0 10px;line-height:1.2;">
							<?php echo $is_fr ? esc_html( 'Ce qui arrive aux fiches de vos clients ' ) : esc_html( 'What happens to your clients profiles ' ); ?>
							<span class="avi-title-accent"><?php echo esc_html( $is_fr ? 'sans surveillance active' : 'without active monitoring' ); ?></span>
						</h2>
						<p style="font-size:0.92rem;color:rgba(255,255,255,0.48);max-width:640px;margin:0 auto;line-height:1.7;">
							<?php echo esc_html( $is_fr ? 'La plupart des agences découvrent ces problèmes quand leur client les appelle — pas avant.' : 'Most agencies find out about these problems when their client calls — not before.' ); ?>
						</p>
					</div>
					<div class="avi-home-threat-grid">
						<div style="background:rgba(220,50,50,0.07);border:1px solid rgba(220,50,50,0.22);border-radius:14px;padding:22px 18px;">
							<span style="font-size:1.35rem;display:block;margin-bottom:10px;">⚠️</span>
							<h3 style="color:#fff;font-size:1rem;font-weight:700;margin:0 0 8px;"><?php echo esc_html( $is_fr ? 'Risque pour la relation client' : 'Client relationship risk' ); ?></h3>
							<p style="font-style:italic;color:rgba(255,255,255,0.7);margin:0 0 10px;font-size:0.9rem;"><?php echo esc_html( $is_fr ? '"Quelqu\'un a modifié la fiche de mon client — et je ne l\'ai pas vu."' : '"Someone edited my client\'s profile — and I didn\'t know."' ); ?></p>
							<p style="color:rgba(255,255,255,0.55);font-size:0.85rem;margin:0 0 14px;line-height:1.6;"><?php echo esc_html( $is_fr ? 'Google autorise les modifications publiques sur n\'importe quelle fiche. Adresse, téléphone, horaires — n\'importe qui peut suggérer un changement. Sans surveillance, c\'est votre client qui le découvre en premier. Cette conversation ne se passe jamais bien.' : 'Google allows public edits on any Business Profile. Address, phone, opening hours — anyone can suggest a change. Without monitoring, your client discovers it first. That conversation never goes well.' ); ?></p>
							<span style="font-size:0.7rem;text-transform:uppercase;letter-spacing:0.05em;color:#f87171;background:rgba(220,50,50,0.15);padding:3px 8px;border-radius:20px;"><?php echo esc_html( $is_fr ? 'Risque immédiat' : 'Happening now' ); ?></span>
						</div>
						<div style="background:rgba(220,50,50,0.07);border:1px solid rgba(220,50,50,0.22);border-radius:14px;padding:22px 18px;">
							<span style="font-size:1.35rem;display:block;margin-bottom:10px;">⏱️</span>
							<h3 style="color:#fff;font-size:1rem;font-weight:700;margin:0 0 8px;"><?php echo esc_html( $is_fr ? 'Problème de passage à l\'échelle' : 'Scaling problem' ); ?></h3>
							<p style="font-style:italic;color:rgba(255,255,255,0.7);margin:0 0 10px;font-size:0.9rem;"><?php echo esc_html( $is_fr ? '"Gérer 30 fiches manuellement prend 30× plus de temps."' : '"Managing 30 profiles manually takes 30× the time."' ); ?></p>
							<p style="color:rgba(255,255,255,0.55);font-size:0.85rem;margin:0 0 14px;line-height:1.6;"><?php echo esc_html( $is_fr ? 'Répondre aux avis, mettre à jour les posts, vérifier les positions — multiplié sur chaque établissement client. La gestion manuelle ne passe pas à l\'échelle. À un moment, vous devez embaucher ou faire des compromis.' : 'Responding to reviews, updating posts, checking positions — multiplied across every client location. Manual management doesn\'t scale. At some point, you either hire or you cut corners.' ); ?></p>
							<span style="font-size:0.7rem;text-transform:uppercase;letter-spacing:0.05em;color:#f87171;background:rgba(220,50,50,0.15);padding:3px 8px;border-radius:20px;"><?php echo esc_html( $is_fr ? 'Problème courant' : 'Common problem' ); ?></span>
						</div>
						<div style="background:rgba(245,158,11,0.07);border:1px solid rgba(245,158,11,0.22);border-radius:14px;padding:22px 18px;">
							<span style="font-size:1.35rem;display:block;margin-bottom:10px;">📉</span>
							<h3 style="color:#fff;font-size:1rem;font-weight:700;margin:0 0 8px;"><?php echo esc_html( $is_fr ? 'Risque de churn' : 'Retention risk' ); ?></h3>
							<p style="font-style:italic;color:rgba(255,255,255,0.7);margin:0 0 10px;font-size:0.9rem;"><?php echo esc_html( $is_fr ? '"Mon client ne voit pas ce que je fais pour lui chaque mois."' : '"My client doesn\'t see what I do for them every month."' ); ?></p>
							<p style="color:rgba(255,255,255,0.55);font-size:0.85rem;margin:0 0 14px;line-height:1.6;"><?php echo esc_html( $is_fr ? 'Sans résultats visibles — scores, alertes traitées, positions suivies — votre valeur est invisible. Les clients qui ne voient pas le travail commencent à se demander s\'ils ont vraiment besoin de vous.' : 'Without visible results — scores, alerts handled, positions tracked — your value is invisible. Clients who can\'t see the work start questioning whether they need you at all.' ); ?></p>
							<span style="font-size:0.7rem;text-transform:uppercase;letter-spacing:0.05em;color:#fbbf24;background:rgba(245,158,11,0.15);padding:3px 8px;border-radius:20px;"><?php echo esc_html( $is_fr ? 'Impact churn' : 'Churn impact' ); ?></span>
						</div>
					</div>
					<p style="text-align:center;font-style:italic;color:#F59E0B;margin-top:32px;font-size:0.95rem;max-width:800px;margin-left:auto;margin-right:auto;line-height:1.65;">
						<?php echo esc_html( $is_fr ? 'AVI surveille chaque fiche de votre flotte simultanément — détectant les menaces, répondant aux avis et suivant chaque évolution de position. Automatiquement.' : 'AVI monitors every profile in your fleet simultaneously — detecting threats, responding to reviews, and tracking every position change. Automatically.' ); ?>
					</p>
				</div>
			</section>

			<!-- SECTION 3 — AVI Engine -->
			<section class="avi-home-page__section avi-home-page__engine">
				<div class="avi-home-page__inner">
					<div class="avi-home-meet-grid">

						<div class="avi-home-meet-avatar-wrap">
							<img
								src="<?php echo esc_url( plugins_url( 'assets/images/avi-chat.png', AVISION_PLUGIN_DIR . 'avision-dashboard.php' ) ); ?>"
								alt="AVI — Agency Fleet Intelligence"
								class="avi-home-meet-avatar-img"
								width="100"
								height="100">
							<span class="avi-home-meet-name">AVI</span>
							<span class="avi-home-meet-role">
								<?php echo $is_fr ? 'Intelligence de flotte agence' : 'Agency Fleet Intelligence'; ?>
							</span>
							<span class="avi-home-meet-status">
								<span class="avi-home-meet-dot"></span>
								<?php echo $is_fr ? 'Surveillance de votre flotte' : 'Monitoring your fleet'; ?>
							</span>
							<div class="avi-home-meet-training">
								<div class="avi-home-meet-training-bar">
									<div class="avi-home-meet-training-fill"></div>
								</div>
								<span class="avi-home-meet-training-label">
									<?php echo $is_fr ? 'SEO local · ROI agence · Gestion de flotte' : 'Local SEO · Fleet ROI · Agency ops'; ?>
								</span>
								<span class="avi-home-meet-training-status">
									<span class="avi-home-meet-training-dot"></span>
									<?php echo $is_fr ? 'En formation continue' : 'Continuously trained'; ?>
								</span>
							</div>
						</div>

						<div class="avi-home-meet-body">
							<h2><?php echo $is_fr ? 'Le moteur d\'intelligence derrière <span class="avi-title-accent">les résultats de votre agence</span>' : 'The intelligence engine behind <span class="avi-title-accent">your agency\'s results</span>'; ?></h2>
							<p class="avi-home-meet-lead">
								<?php echo $is_fr ? 'AVI est formé spécifiquement pour la gestion de flotte SEO local, le ROI agence et les opérations multi-établissements. Il ne se contente pas de rapporter — il agit, optimise et devient plus précis à chaque fiche qu\'il gère.' : 'AVI is trained specifically for local SEO fleet management, agency ROI, and multi-location operations. It doesn\'t just report — it acts, optimizes, and gets sharper with every profile it manages.'; ?>
							</p>
							<ul class="avi-home-meet-list">
								<li><?php echo $is_fr ? 'Identifie l\'action à plus fort impact pour chaque client — chaque jour' : 'Surfaces the highest-impact action for each client — every day'; ?></li>
								<li><?php echo $is_fr ? 'Répond aux avis, corrige les modifications, publie du contenu — sans intervention manuelle' : 'Responds to reviews, corrects edits, publishes content — without manual input'; ?></li>
								<li><?php echo $is_fr ? 'Guide votre agence sur la stratégie globale de flotte, pas seulement les fiches individuelles' : 'Guides your agency on fleet-wide strategy, not just individual profiles'; ?></li>
								<li><?php echo $is_fr ? 'Travaille en arrière-plan pendant que vous vous concentrez sur la croissance de vos relations clients' : 'Works in the background while you focus on growing your client relationships'; ?></li>
							</ul>
						</div>

					</div>
				</div>
			</section>

			<!-- SECTION 4 — Products -->
			<section class="avi-home-page__section">
				<div class="avi-home-page__inner">
					<h2 class="avi-home-page__section-title"><?php echo esc_html( $is_fr ? 'Tout ce dont votre flotte d\'agence a besoin' : 'Everything Your Agency Fleet Needs' ); ?></h2>
					<p class="avi-home-page__section-sub"><?php echo esc_html( $is_fr ? 'Une plateforme. Tous vos clients. Exécution entièrement automatisée.' : 'One platform. All your clients. Fully automated execution.' ); ?></p>
					<div class="avi-home-page__products-grid">
						<div class="avi-home-page__product-card">
							<div class="avi-home-page__product-icon">🛡️</div>
							<h3 class="avi-home-page__product-title"><?php echo esc_html( $is_fr ? 'Guardian Mode — Flotte' : 'Guardian Mode — Fleet' ); ?></h3>
							<p class="avi-home-page__product-desc"><?php echo esc_html( $is_fr ? 'Surveillez et protégez toutes les fiches de vos clients simultanément. Réponses aux avis groupées, détection de modifications et publications planifiées — automatisées sur chaque établissement.' : 'Monitor and protect all your clients listings simultaneously. Bulk review responses, change detection, and scheduled posts — automated across every location.' ); ?></p>
							<a class="avi-home-page__product-cta" href="<?php echo esc_url( $url_how ); ?>"><?php echo esc_html( $is_fr ? 'Comment ça marche' : 'How it works' ); ?></a>
						</div>
						<div class="avi-home-page__product-card">
							<div class="avi-home-page__product-icon">📡</div>
							<h3 class="avi-home-page__product-title"><?php echo esc_html( $is_fr ? 'Growth Radar — Multi-établissements' : 'Growth Radar — Multi-Location' ); ?></h3>
							<p class="avi-home-page__product-desc"><?php echo esc_html( $is_fr ? 'Suivez les positions de mots-clés sur toutes les fiches clients depuis un seul tableau de bord. Détectez les baisses avant vos clients. Données de recherche locale en temps réel.' : 'Track keyword positions across all client locations from one dashboard. Spot drops before clients notice. Real-time local search data.' ); ?></p>
							<a class="avi-home-page__product-cta" href="<?php echo esc_url( $url_how ); ?>"><?php echo esc_html( $is_fr ? 'Comment ça marche' : 'How it works' ); ?></a>
						</div>
						<div class="avi-home-page__product-card">
							<div class="avi-home-page__product-icon">🏢</div>
							<h3 class="avi-home-page__product-title"><?php echo esc_html( $is_fr ? 'Fleet Dashboard Agence' : 'Agency Fleet Dashboard' ); ?></h3>
							<p class="avi-home-page__product-desc"><?php echo esc_html( $is_fr ? 'Tous les clients, tous les établissements, toutes les alertes en une vue. Importez votre flotte en quelques minutes. Des actions groupées qui font gagner des heures chaque semaine.' : 'All clients, all locations, all alerts in one view. Import your fleet in minutes. Bulk actions that save hours every week.' ); ?></p>
							<a class="avi-home-page__product-cta" href="<?php echo esc_url( $url_pricing ); ?>"><?php echo esc_html( $is_fr ? 'Voir les offres agence' : 'See agency plans' ); ?></a>
						</div>
					</div>
				</div>
			</section>

			<!-- SECTION 5 — Fleet Command Center -->
			<section class="avi-home-page__section" style="background:#0A1628">
				<div class="avi-home-page__inner">
					<div class="avi-home-page__split">
						<div class="avi-home-page__split-img" style="min-height:auto;padding:16px;align-items:stretch;">
							<div>
								<span style="display:inline-flex;align-items:center;gap:6px;font-size:0.78rem;color:#4ade80;background:rgba(34,197,94,0.12);padding:4px 12px;border-radius:20px;margin-bottom:12px;">
									<span style="width:7px;height:7px;background:#4ade80;border-radius:50%;display:inline-block;"></span>
									<?php echo esc_html( $is_fr ? 'Produit live' : 'Live product' ); ?>
								</span>
								<img src="<?php echo $agency_dash_img; ?>" alt="<?php echo esc_attr( $is_fr ? 'Avision Agency Fleet Dashboard — interface de gestion multi-établissements' : 'Avision Agency Fleet Dashboard — multi-location management interface' ); ?>" style="width:100%;border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,0.4);display:block;">
							</div>
						</div>
						<div>
							<h2 style="margin:0 0 8px;font-size:1.75rem;font-weight:800;color:#fff"><?php echo esc_html( $is_fr ? 'Centre de commandement de flotte' : 'Fleet Command Center' ); ?></h2>
							<p style="margin:0 0 16px;color:#6B9FE8;font-size:15px"><?php echo esc_html( $is_fr ? 'Gérez chaque établissement client depuis un seul cockpit' : 'Manage every client location from a single cockpit' ); ?></p>
							<p style="margin:0 0 20px;color:#94a3b8;line-height:1.7"><?php echo esc_html( $is_fr ? 'Votre tableau de bord agence vous offre une visibilité en temps réel sur l\'ensemble de votre portefeuille. Suivez le statut Guardian, les scores Radar et les alertes d\'avis — sans changer d\'onglet.' : 'Your agency dashboard gives you real-time visibility across your entire portfolio. Monitor Guardian status, Radar scores, and review alerts — all without switching tabs.' ); ?></p>
							<ul class="avi-home-page__bullets" style="margin:0 0 20px">
								<li><?php echo esc_html( $is_fr ? 'KPIs en direct sur tous les profils clients' : 'Live KPIs across all client profiles' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Réponses Guardian automatisées en votre nom' : 'Automated Guardian responses in your name' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Rapports Radar hebdomadaires livrés dans votre boîte mail' : 'Weekly Radar reports delivered to your inbox' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'AVI — votre moteur d\'intelligence de flotte, guidant votre agence vers les actions à plus fort impact sur chaque profil client, chaque jour.' : 'AVI — your fleet intelligence engine, guiding your agency toward the highest-impact actions across every client profile, every day.' ); ?></li>
							</ul>
							<div class="avi-home-page__btn-row">
								<a href="<?php echo esc_url( $url_pricing ); ?>" class="avi-btn avi-btn--primary"><?php echo esc_html( $is_fr ? 'Voir les offres agence' : 'See agency plans' ); ?></a>
								<a href="<?php echo esc_url( $url_how ); ?>" style="color:#94a3b8;font-size:14px;text-decoration:none;align-self:center"><?php echo esc_html( $is_fr ? 'Comment ça marche →' : 'How it works →' ); ?></a>
							</div>
						</div>
					</div>
				</div>
			</section>

			<!-- SECTION 6 — Bulk activation -->
			<section class="avi-home-page__section">
				<div class="avi-home-page__inner">
					<div class="avi-home-page__bulk">
						<h2 class="avi-home-page__section-title" style="margin-bottom:12px"><?php echo esc_html( $is_fr ? 'Activez Guardian & Growth Radar pour toute votre flotte — en un clic.' : 'Activate Guardian & Growth Radar for your entire fleet — in one click.' ); ?></h2>
						<p class="avi-home-page__section-sub" style="margin-bottom:0"><?php echo esc_html( $is_fr ? 'Aujourd\'hui vous gérez chaque établissement client individuellement. Bientôt, vous sélectionnerez tout votre portefeuille, choisirez Guardian Mode ou Growth Radar, et déploierez sur chaque fiche simultanément — un seul paiement, une seule confirmation, c\'est fait.' : 'Today you manage each client location individually. Soon, you\'ll select your entire portfolio, choose Guardian Mode or Growth Radar, and deploy across every profile simultaneously — one checkout, one confirmation, done.' ); ?></p>
						<div class="avi-home-page__bulk-grid">
							<div class="avi-home-page__bulk-item">
								<div style="font-size:28px">🛡️</div>
								<h3><?php echo esc_html( $is_fr ? 'Activation Guardian de flotte' : 'Fleet Guardian Activation' ); ?></h3>
								<p><?php echo esc_html( $is_fr ? 'Déployez Guardian Mode sur tous vos établissements clients sélectionnés en une seule opération. Chaque fiche protégée simultanément — votre charge de travail reste constante pendant que votre portefeuille grandit.' : 'Deploy Guardian Mode across your selected client locations in a single operation. Every profile protected simultaneously — your workload stays flat as your portfolio scales.' ); ?></p>
							</div>
							<div class="avi-home-page__bulk-item">
								<div style="font-size:28px">📡</div>
								<h3><?php echo esc_html( $is_fr ? 'Activation Radar de flotte' : 'Fleet Radar Activation' ); ?></h3>
								<p><?php echo esc_html( $is_fr ? 'Attribuez Growth Radar — Hebdo ou Elite — à plusieurs établissements clients en une fois. Suivez chaque mot-clé, pour chaque client, sans les gérer un par un.' : 'Assign Growth Radar — Weekly or Elite — to multiple client locations at once. Track every keyword, for every client, without managing them one by one.' ); ?></p>
							</div>
							<div class="avi-home-page__bulk-item">
								<div style="font-size:28px">⚙️</div>
								<h3><?php echo esc_html( $is_fr ? 'Facturation wholesale en une session' : 'Wholesale Billing in One Session' ); ?></h3>
								<p><?php echo esc_html( $is_fr ? 'Un seul paiement Stripe pour toute votre sélection. Tarification par palier appliquée automatiquement — plus vous activez d\'établissements, plus votre coût par fiche diminue.' : 'One Stripe checkout for your entire selection. Tier pricing applied automatically — the more locations you activate, the lower your per-location cost.' ); ?></p>
							</div>
						</div>
					</div>
				</div>
			</section>

			<!-- SECTION 7 — Grey / White Label -->
			<section class="avi-home-page__section" style="background:#0A1628">
				<div class="avi-home-page__inner">
					<h2 class="avi-home-page__section-title"><?php echo esc_html( $is_fr ? 'Votre marque. AVI fait le travail.' : 'Your brand. AVI does the work.' ); ?></h2>
					<p class="avi-home-page__section-sub"><?php echo esc_html( $is_fr ? 'Avision est conçu pour travailler en arrière-plan. Vos clients voient les résultats — c\'est vous qui prenez le crédit.' : 'Avision is built to work in the background. Your clients see results — you take the credit.' ); ?></p>
					<div class="avi-home-page__label-cards">
						<div class="avi-home-page__label-card avi-home-page__label-card--grey">
							<div style="font-size:24px;margin-bottom:8px">🏷️</div>
							<h3 style="margin:0 0 12px;color:#fff">Grey Label</h3>
							<p style="margin:0 0 16px;color:#94a3b8;font-size:14px;line-height:1.65"><?php echo esc_html( $is_fr ? 'Le logo de votre agence affiché sur toute la plateforme. Les tableaux de bord clients sont accessibles sous votre marque, avec une structure d\'URL dédiée — avision.org/nom-de-votre-agence/ AVI reste discret. Votre agence est au premier plan.' : 'Your agency logo displayed throughout the platform. Client dashboards are accessible under your brand, with a dedicated URL structure — avision.org/your-agency-name/ AVI stays discreet. Your agency is front and center.' ); ?></p>
							<ul class="avi-home-page__label-check">
								<li><?php echo esc_html( $is_fr ? 'Votre logo sur toutes les vues clients' : 'Your logo on all client-facing views' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'URL dédiée par agence' : 'Branded URL per agency' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Présence AVI minimale — votre nom en premier' : 'AVI branding minimal — your name first' ); ?></li>
							</ul>
						</div>
						<div class="avi-home-page__label-card avi-home-page__label-card--white">
							<span class="avi-home-page__badge-pill">⬜ <?php echo esc_html( $is_fr ? 'Contactez-nous' : 'Contact us' ); ?></span>
							<h3 style="margin:0 0 12px;color:#fff">White Label</h3>
							<p style="margin:0 0 16px;color:#94a3b8;font-size:14px;line-height:1.65"><?php echo esc_html( $is_fr ? 'Propriété totale de la marque. Remplacez entièrement AVI par le nom de votre agence — y compris l\'assistant chat. Vos clients ne voient jamais "AVI" — ils voient votre produit.' : 'Full brand ownership. Replace AVI entirely with your agency name — including the chat assistant. Your clients never see "AVI" — they see your product.' ); ?></p>
							<ul class="avi-home-page__label-check">
								<li><?php echo esc_html( $is_fr ? 'Domaine personnalisé & branding complet' : 'Custom domain & full branding' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Chat AVI renommé à votre marque' : 'AVI chat renamed to your brand' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Onboarding dédié & support prioritaire' : 'Dedicated onboarding & priority support' ); ?></li>
							</ul>
							<a href="<?php echo esc_url( $url_contact ); ?>" class="avi-home-page__product-cta" style="display:inline-block;margin-top:12px"><?php echo esc_html( $is_fr ? 'Parlez-nous du White Label →' : 'Talk to us about White Label →' ); ?></a>
						</div>
					</div>
				</div>
			</section>

			<!-- SECTION 8 — Client reporting -->
			<section class="avi-home-page__section">
				<div class="avi-home-page__inner">
					<h2 class="avi-home-page__section-title"><?php echo esc_html( $is_fr ? 'Rapports clients — sans PDF, sans export' : 'Client reporting — no PDF, no export needed' ); ?></h2>
					<p class="avi-home-page__section-sub"><?php echo esc_html( $is_fr ? 'Partagez un lien. Votre client voit tout en temps réel.' : 'Share a link. Your client sees everything in real time.' ); ?></p>
					<div class="avi-home-page__report-grid">
						<div class="avi-home-page__report-item">
							<div style="font-size:24px">🔗</div>
							<h3><?php echo esc_html( $is_fr ? 'Lien tableau de bord live' : 'Live dashboard link' ); ?></h3>
							<p><?php echo esc_html( $is_fr ? 'Chaque client dispose d\'une vue en lecture seule de son tableau de bord premium — score, activité Guardian, positions de mots-clés. Dynamique, toujours à jour. Partagez simplement le lien.' : 'Each client gets a read-only view of their premium dashboard — score, Guardian activity, keyword positions. Dynamic, always up to date. Just share the link.' ); ?></p>
						</div>
						<div class="avi-home-page__report-item">
							<div style="font-size:24px">🎛️</div>
							<h3><?php echo esc_html( $is_fr ? 'Contrôle total de la visibilité' : 'Full visibility control' ); ?></h3>
							<p><?php echo esc_html( $is_fr ? 'Vous décidez ce que voit votre client. Masquez n\'importe quelle section du tableau de bord — y compris le chat AVI — en un seul clic. Montrez uniquement ce qui renforce la valeur de votre agence.' : 'You decide what your client sees. Hide any dashboard section you prefer — including the AVI chat — with a single toggle. Show only what reinforces your agency\'s value.' ); ?></p>
						</div>
						<div class="avi-home-page__report-item">
							<div style="font-size:24px">👁️</div>
							<h3><?php echo esc_html( $is_fr ? 'Lecture seule. Toujours.' : 'Read-only. Always.' ); ?></h3>
							<p><?php echo esc_html( $is_fr ? 'Les tableaux de bord clients sont strictement en lecture seule. Votre client suit sa progression — il ne peut pas modifier les paramètres, les abonnements ni aucune configuration gérée.' : 'Client dashboards are strictly read-only. Your client follows their progress — they cannot modify settings, subscriptions, or any managed configuration.' ); ?></p>
						</div>
						<div class="avi-home-page__report-item">
							<div style="font-size:24px">📊</div>
							<h3><?php echo esc_html( $is_fr ? 'Simulateur de marge wholesale' : 'Wholesale margin simulator' ); ?></h3>
							<p><?php echo esc_html( $is_fr ? 'Une fois connecté, votre tableau de bord agence inclut un simulateur de marge — calculez votre coût exact par établissement et fixez votre tarif client en conséquence. Disponible après l\'onboarding.' : 'Once connected, your Agency Dashboard includes a margin simulator — calculate your exact cost per location and set your client retainer accordingly. Available after onboarding.' ); ?></p>
						</div>
					</div>
					<p style="text-align:center;margin-top:28px">
						<a href="<?php echo esc_url( $url_pricing ); ?>" class="avi-home-page__product-cta"><?php echo esc_html( $is_fr ? 'Voir le tableau de tarifs complet →' : 'See full pricing table →' ); ?></a>
					</p>
				</div>
			</section>

			<!-- SECTION 9 — Agency pitch -->
			<section class="avi-home-page__section" style="background:#0A1628">
				<div class="avi-home-page__inner">
					<div class="avi-home-page__split">
						<div>
							<span class="avi-home-page__agency-badge"><?php echo esc_html( $is_fr ? 'Conçu pour les agences' : 'Built for Agencies' ); ?></span>
							<h2 style="margin:0 0 16px;font-size:1.75rem;font-weight:800;color:#fff"><?php echo esc_html( $is_fr ? 'De 1 client à 500 — Le même effort' : 'From 1 Client to 500 — Same Effort' ); ?></h2>
							<p style="margin:0 0 12px;color:#cbd5e1;line-height:1.7"><?php echo esc_html( $is_fr ? 'Arrêtez de gérer chaque établissement manuellement. Le moteur de flotte Avision vous permet d\'exécuter des actions groupées, de surveiller tous les établissements simultanément et de livrer des rapports — sans recruter.' : 'Stop managing each location manually. Avision\'s fleet engine lets you execute bulk actions, monitor all locations simultaneously, and deliver reports — without adding a single team member.' ); ?></p>
							<p style="margin:0 0 20px;color:#94a3b8;line-height:1.7"><?php echo esc_html( $is_fr ? 'La tarification wholesale évolue avec votre flotte. Plus vous gérez d\'établissements, plus votre coût par fiche diminue.' : 'Wholesale pricing scales with your fleet. The more locations you manage, the lower your per-location cost.' ); ?></p>
							<div class="avi-home-page__btn-row">
								<a href="<?php echo esc_url( $url_pricing ); ?>" class="avi-btn avi-btn--primary"><?php echo esc_html( $is_fr ? 'Voir les offres agence →' : 'View Agency Plans →' ); ?></a>
								<a href="<?php echo esc_url( $url_pricing ); ?>" style="color:#94a3b8;font-size:14px;text-decoration:none;align-self:center"><?php echo esc_html( $is_fr ? 'Voir les paliers wholesale →' : 'View wholesale tiers →' ); ?></a>
							</div>
						</div>
						<div>
							<ul class="avi-home-page__checklist">
								<li><?php echo esc_html( $is_fr ? 'Réponses aux avis groupées sur tous les établissements' : 'Bulk review response across all locations' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Tableau de bord d\'alertes centralisé — une vue, tous les clients' : 'Centralized alert dashboard — one view, all clients' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Authentification Google OAuth pour toute la flotte' : 'Google OAuth fleet authentication' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Tarification wholesale T1 / T2 / T3 par palier' : 'Wholesale T1 / T2 / T3 tiered pricing' ); ?></li>
								<li><?php echo esc_html( $is_fr ? 'Importez votre flotte cliente via CSV' : 'Import your client fleet via CSV' ); ?></li>
							</ul>
						</div>
					</div>
				</div>
			</section>

			<!-- SECTION 10 — CTA banner -->
			<section class="avi-home-page__section">
				<div class="avi-home-page__inner">
					<div class="avi-home-page__cta-banner">
						<h2><?php echo esc_html( $is_fr ? 'Prêt à faire évoluer votre agence sans agrandir votre équipe ?' : 'Ready to Scale Your Agency Without Scaling Your Team?' ); ?></h2>
						<p><?php echo esc_html( $is_fr ? 'La configuration prend moins de 10 minutes. Premier établissement surveillé gratuitement pendant 15 jours.' : 'Setup takes under 10 minutes. First location monitored free for 15 days.' ); ?></p>
						<a href="<?php echo esc_url( $url_pricing ); ?>" class="avi-btn avi-btn--primary"><?php echo esc_html( $is_fr ? 'Accéder à l\'offre agence →' : 'Get Agency Access →' ); ?></a>
					</div>
				</div>
			</section>

			<!-- SECTION 11 — Security -->
			<section class="avi-home-page__section avi-home-page__security" style="background:#0A1628">
				<div class="avi-home-page__inner">
					<div style="font-size:48px;margin-bottom:16px">🛡️</div>
					<h2 class="avi-home-page__section-title"><?php echo esc_html( $is_fr ? 'Alimenté par des données officielles et sécurisées' : 'Securely Powered by Official Data' ); ?></h2>
					<p><?php echo esc_html( $is_fr ? 'Avision s\'intègre à l\'API Google Business Profile pour fournir des données SEO local en temps réel, précises et exploitables. Nous respectons strictement les normes de confidentialité et de sécurité des données d\'entreprise.' : 'Avision integrates with the Google Business Profile API to provide real-time, accurate, and actionable local SEO data. We strictly adhere to enterprise-grade data privacy and security guidelines.' ); ?></p>
					<a href="<?php echo esc_url( $url_security ); ?>" class="avi-home-page__product-cta"><?php echo esc_html( $is_fr ? 'En savoir plus sur notre sécurité API →' : 'Learn about our API security →' ); ?></a>
				</div>
			</section>

			<!-- B2C link -->
			<div class="avi-home-page__b2c">
				<div class="avi-home-page__inner">
					<?php echo esc_html( $is_fr ? 'Vous êtes un commerce local ? ' : 'Are you a local business owner? ' ); ?>
					<a href="<?php echo esc_url( $url_audit ); ?>"><?php echo esc_html( $is_fr ? 'Obtenez votre audit de visibilité locale gratuit →' : 'Get your free local visibility audit →' ); ?></a>
				</div>
			</div>

			<?php
			$avi_lang = $is_fr ? 'fr' : 'en';
			include __DIR__ . '/../partials/avi-gbp-notice.php';
			?>

		</div>
		<?php
	}
);
