<script setup lang="ts">
import { Server, CheckCircle, Zap, Shield, Clock, Wifi, ArrowRight, Phone } from "lucide-vue-next";
import Header from "@/components/layout/Header.vue";
import Footer from "@/components/layout/Footer.vue";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
import { RouterLink } from "vue-router";

const features = [
  "Fibre optique jusqu'à 10 Gbit/s",
  "IP statique incluse",
  "Garantie de disponibilité 99.9%",
  "Sauvegarde LTE automatique",
  "Installation gratuite",
  "Contrat flexible",
  "Support technique 24/7",
  "Monitoring proactif"
];

const advantages = [
  {
    icon: Zap,
    title: "Vitesse maximale",
    description: "Jusqu'à 10 Gbit/s en fibre optique dédiée pour vos opérations critiques."
  },
  {
    icon: Shield,
    title: "Fiabilité garantie",
    description: "SLA de 99.9% avec sauvegarde LTE automatique en cas de panne."
  },
  {
    icon: Clock,
    title: "Support prioritaire",
    description: "Équipe technique disponible 24/7 avec temps de réponse garanti."
  },
  {
    icon: Wifi,
    title: "Wi-Fi professionnel",
    description: "Solution Wi-Fi entreprise incluse pour une couverture optimale."
  }
];

const plans = [
  {
    name: "Essentiel",
    price: "89$",
    description: "Idéal pour les petits bureaux et le télétravail.",
    features: ["500 Mbit/s illimité", "Support prioritaire 8h-18h", "1 adresse IP statique", "Routeur Wi-Fi 6 inclus"]
  },
  {
    name: "Performance",
    price: "119$",
    description: "La vitesse standard pour les PME en croissance.",
    popular: true,
    features: ["1 Gbit/s illimité", "Support prioritaire 24/7", "5 adresses IP statiques", "Routeur Wi-Fi 6E inclus", "Sauvegarde LTE (Option)"]
  },
  {
    name: "Ultimate",
    price: "249$",
    description: "Puissance maximale pour les gros transferts.",
    features: ["10 Gbit/s illimité", "Support dédié 24/7", "Bloc IP /29 inclus", "Borne Wi-Fi Pro incluse", "SLA 99.9% garanti"]
  }
];
</script>

<template>
  <div class="min-h-screen bg-background">
    <Header />

    <!-- Hero Section -->
    <section class="relative pt-24 pb-16 md:pt-32 md:pb-24 bg-gradient-to-br from-primary/10 via-background to-secondary/10">
      <div class="container mx-auto px-4">
        <div class="max-w-4xl mx-auto text-center">
          <RouterLink
            to="/business"
            class="inline-flex items-center text-primary hover:underline mb-6"
          >
            ← Retour aux solutions affaires
          </RouterLink>

          <div class="w-20 h-20 bg-primary/10 rounded-2xl flex items-center justify-center mx-auto mb-8 border border-primary/20">
            <Server class="h-10 w-10 text-primary" />
          </div>

          <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-6">
            Internet <span class="text-primary">Affaires</span>
          </h1>

          <p class="text-lg md:text-xl text-muted-foreground mb-10 max-w-3xl mx-auto leading-relaxed">
            Connexion fibre optique dédiée à la vitesse de vos besoins d'affaires. Performance et fiabilité garanties pour propulser votre entreprise.
          </p>

          <div class="flex flex-col sm:flex-row gap-4 justify-center">
            <Button size="lg" class="text-lg px-8" as-child>
              <a href="/#contact">
                Demander une soumission
                <ArrowRight class="ml-2 h-5 w-5" />
              </a>
            </Button>
            <Button size="lg" variant="outline" class="text-lg px-8">
              <Phone class="mr-2 h-5 w-5" />
              1-855-888-2746
            </Button>
          </div>
        </div>
      </div>
    </section>

    <!-- Pricing Section -->
    <section class="py-16 md:py-24 bg-muted/30">
      <div class="container mx-auto px-4">
        <div class="text-center mb-12">
          <h2 class="text-3xl md:text-4xl font-bold text-foreground mb-4">Nos Forfaits Internet</h2>
          <p class="text-muted-foreground">Des vitesses adaptées à la réalité de votre entreprise</p>
        </div>

        <div class="grid md:grid-cols-3 gap-8 max-w-5xl mx-auto">
          <Card v-for="(plan, index) in plans" :key="index" :class="`relative ${plan.popular ? 'border-primary border-2 shadow-xl' : ''}`">
            <span v-if="plan.popular" class="absolute -top-3 left-1/2 -translate-x-1/2 bg-primary text-primary-foreground px-4 py-1 rounded-full text-sm font-medium">
              Recommandé
            </span>
            <CardHeader class="text-center pt-8">
              <CardTitle class="text-2xl">{{ plan.name }}</CardTitle>
              <CardDescription>{{ plan.description }}</CardDescription>
              <div class="mt-4">
                <span class="text-4xl font-bold text-primary">{{ plan.price }}</span>
                <span class="text-muted-foreground text-sm">/mois</span>
              </div>
            </CardHeader>
            <CardContent>
              <ul class="space-y-3 mb-6">
                <li v-for="(feature, idx) in plan.features" :key="idx" class="flex items-center gap-3">
                  <CheckCircle class="h-5 w-5 text-primary flex-shrink-0" />
                  <span class="text-muted-foreground">{{ feature }}</span>
                </li>
              </ul>
              <Button class="w-full" :variant="plan.popular ? 'default' : 'outline'" as-child>
                <a href="/#contact">Choisir ce forfait <ArrowRight class="w-4 h-4 ml-2" /></a>
              </Button>
            </CardContent>
          </Card>
        </div>
      </div>
    </section>

    <!-- Advantages -->
    <section class="py-16 md:py-24">
      <div class="container mx-auto px-4">
        <div class="text-center mb-12">
          <h2 class="text-3xl md:text-4xl font-bold text-foreground mb-4">Pourquoi choisir TARGO?</h2>
        </div>
        <div class="grid md:grid-cols-2 lg:grid-cols-4 gap-6 max-w-6xl mx-auto">
          <Card v-for="(advantage, index) in advantages" :key="index" class="text-center p-6">
            <CardContent class="p-0">
              <div class="w-14 h-14 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-6">
                <component :is="advantage.icon" class="h-7 w-7 text-primary" />
              </div>
              <h3 class="text-xl font-bold text-foreground mb-3">{{ advantage.title }}</h3>
              <p class="text-muted-foreground text-sm leading-relaxed">{{ advantage.description }}</p>
            </CardContent>
          </Card>
        </div>
      </div>
    </section>

    <!-- Features -->
    <section class="py-16 md:py-24 bg-muted/30">
      <div class="container mx-auto px-4">
        <div class="max-w-4xl mx-auto">
          <div class="text-center mb-12">
            <h2 class="text-3xl font-bold text-foreground mb-4 font-display">
              Ce qui est <span class="text-primary">inclus</span>
            </h2>
            <p class="text-muted-foreground">Tout ce dont vous avez besoin pour une connectivité sans compromis</p>
          </div>

          <div class="grid md:grid-cols-2 gap-4">
            <div
              v-for="(feature, index) in features"
              :key="index"
              class="flex items-center gap-3 bg-card p-4 rounded-xl border border-border hover:border-primary/30 transition-colors"
            >
              <CheckCircle class="h-5 w-5 text-primary flex-shrink-0" />
              <span class="text-foreground font-medium">{{ feature }}</span>
            </div>
          </div>
        </div>
      </div>
    </section>

    <!-- CTA Section -->
    <section class="py-16 md:py-24 bg-primary text-primary-foreground">
      <div class="container mx-auto px-4 text-center">
        <h2 class="text-3xl md:text-4xl font-bold mb-4">Prêt à optimiser votre connexion?</h2>
        <p class="text-lg opacity-90 mb-8 max-w-2xl mx-auto">
          Nos experts analysent vos besoins et vous proposent une solution personnalisée.
        </p>
        <div class="flex flex-col sm:flex-row gap-4 justify-center">
          <Button size="lg" variant="secondary" class="text-lg px-8" as-child>
            <a href="/#contact">Soumission gratuite</a>
          </Button>
        </div>
      </div>
    </section>

    <Footer />
  </div>
</template>
