"use client";

import Link from "next/link";

import {
  MapPin,
  Phone,
  Clock,
  ArrowUpRight,
  MessageCircle,
  Navigation,
} from "lucide-react";

import { useLanguage } from "@/lib/i18n";

const GOOGLE_MAPS_URL =
  "https://maps.app.goo.gl/ugy2vpKiTxzQ3tJ77";

const WHATSAPP_NUMBER = "2250707223112";

const WHATSAPP_URL =
  `https://wa.me/${WHATSAPP_NUMBER}?text=${encodeURIComponent(
    "Bonjour Happy Hours 👋 Je souhaite réserver une table."
  )}`;

const TIKTOK_URL =
  "https://www.tiktok.com/@happyhours45";

const FACEBOOK_URL =
  "https://www.facebook.com/happyhoursci";


export function SiteFooter() {
  const { t } = useLanguage();

  return (
    <footer className="bg-[#151515] text-white">

      {/* CTA PRINCIPAL */}
      <div className="border-b border-white/10">
        <div className="mx-auto max-w-7xl px-5 py-14 md:px-8 md:py-16">

          <div className="flex flex-col gap-8 md:flex-row md:items-center md:justify-between">

            <div className="max-w-2xl">

              <p className="text-xs font-medium uppercase tracking-[0.3em] text-[#d6a85f]">
                HAPPY HOURS · LE PLATEAU
              </p>

              <h2 className="mt-3 text-4xl font-medium leading-tight text-white md:text-5xl">
                Votre table vous attend.
              </h2>

              <p className="mt-4 max-w-xl text-sm leading-7 text-white/60 md:text-base">
                Pour un déjeuner, un dîner, un afterwork ou simplement
                pour profiter de l'instant, retrouvez-nous au cœur du Plateau.
              </p>

            </div>


            <div className="flex flex-col gap-3 sm:flex-row">

              <Link
                href="/reservation"
                className="inline-flex items-center justify-center gap-2 rounded-full bg-[#d6a85f] px-6 py-3 text-sm font-semibold text-[#151515] transition-all duration-300 hover:bg-[#e3bd7c] hover:shadow-lg"
              >
                Réserver une table

                <ArrowUpRight className="h-4 w-4" />

              </Link>


              <a
                href={WHATSAPP_URL}
                target="_blank"
                rel="noopener noreferrer"
                className="inline-flex items-center justify-center gap-2 rounded-full border border-white/15 px-6 py-3 text-sm font-semibold text-white transition-all duration-300 hover:border-[#d6a85f] hover:text-[#d6a85f]"
              >

                <MessageCircle className="h-4 w-4" />

                WhatsApp

              </a>

            </div>

          </div>

        </div>
      </div>



      {/* CONTENU PRINCIPAL */}

      <div className="mx-auto max-w-7xl px-5 py-14 md:px-8 lg:py-16">

        <div className="grid gap-12 md:grid-cols-2 lg:grid-cols-4">


          {/* BRAND */}

          <div className="lg:col-span-2">

            <Link href="/" className="group inline-block">

              <span className="font-serif text-4xl font-semibold tracking-wide text-[#d6a85f] transition-colors duration-300 group-hover:text-[#e3bd7c]">
                Happy Hours
              </span>


              <span className="mt-1 block text-[10px] uppercase tracking-[0.35em] text-white/40">
                Un instant de privilège
              </span>

            </Link>


            <p className="mt-6 max-w-lg text-sm leading-7 text-white/60">
              {t("footer.tagline")}
            </p>


            <div className="mt-7 flex flex-wrap gap-2">

              <span className="rounded-full border border-white/10 px-4 py-2 text-xs text-white/55">
                Restaurant
              </span>

              <span className="rounded-full border border-white/10 px-4 py-2 text-xs text-white/55">
                Afterwork
              </span>

              <span className="rounded-full border border-white/10 px-4 py-2 text-xs text-white/55">
                Bar & Lounge
              </span>

              <span className="rounded-full border border-white/10 px-4 py-2 text-xs text-white/55">
                Ouvert 24h/24
              </span>

            </div>



            {/* RÉSEAUX SOCIAUX */}

            <div className="mt-7 flex items-center gap-3">


              <a
                href={TIKTOK_URL}
                target="_blank"
                rel="noopener noreferrer"
                aria-label="TikTok Happy Hours"
                className="group inline-flex h-10 items-center gap-2 rounded-full border border-white/15 px-4 text-xs font-medium text-white/65 transition-all duration-300 hover:border-[#d6a85f] hover:bg-[#d6a85f] hover:text-[#151515]"
              >

                Tiktok

                <ArrowUpRight className="h-3.5 w-3.5 transition-transform group-hover:-translate-y-0.5 group-hover:translate-x-0.5" />

              </a>



              <a
                href={FACEBOOK_URL}
                target="_blank"
                rel="noopener noreferrer"
                aria-label="Facebook Happy Hours"
                className="group inline-flex h-10 items-center gap-2 rounded-full border border-white/15 px-4 text-xs font-medium text-white/65 transition-all duration-300 hover:border-[#d6a85f] hover:bg-[#d6a85f] hover:text-[#151515]"
              >

                Facebook

                <ArrowUpRight className="h-3.5 w-3.5 transition-transform group-hover:-translate-y-0.5 group-hover:translate-x-0.5" />

              </a>


            </div>


          </div>





          {/* NAVIGATION */}

          <div>

            <h3 className="mb-5 text-xs font-semibold uppercase tracking-[0.2em] text-[#d6a85f]">
              {t("footer.explore")}
            </h3>


            <ul className="space-y-4 text-sm text-white/60">

              <li>
                <Link href="/" className="transition-colors hover:text-[#d6a85f]">
                  Accueil
                </Link>
              </li>


              <li>
                <Link href="/menu" className="transition-colors hover:text-[#d6a85f]">
                  La Carte
                </Link>
              </li>


              <li>
                <Link href="/reservation" className="transition-colors hover:text-[#d6a85f]">
                  Réserver une table
                </Link>
              </li>


              <li>
                <Link href="/commander" className="transition-colors hover:text-[#d6a85f]">
                  Commander
                </Link>
              </li>


              <li>
                <Link href="/evenements" className="transition-colors hover:text-[#d6a85f]">
                  L'expérience Happy Hours
                </Link>
              </li>


            </ul>

          </div>






          {/* CONTACT */}

          <div>

            <h3 className="mb-5 text-xs font-semibold uppercase tracking-[0.2em] text-[#d6a85f]">
              Nous trouver
            </h3>


            <ul className="space-y-5 text-sm text-white/60">


              <li className="flex items-start gap-3">

                <MapPin className="mt-0.5 h-4 w-4 shrink-0 text-[#d6a85f]" />


                <span className="leading-relaxed">
                  Abidjan – Plateau
                  <br />
                  Face à la rue Paris-Village
                  <br />
                  Côte d'Ivoire
                </span>

              </li>



              <li className="flex items-center gap-3">

                <Phone className="h-4 w-4 shrink-0 text-[#d6a85f]" />


                <a
                  href="tel:+2250707223112"
                  className="transition-colors hover:text-[#d6a85f]"
                >
                  +225 07 07 22 31 12
                </a>


              </li>



              <li className="flex items-center gap-3">

                <Clock className="h-4 w-4 shrink-0 text-[#d6a85f]" />

                <span>
                  Ouvert 24h/24 · 7j/7
                </span>

              </li>



              <li>

                <a
                  href={GOOGLE_MAPS_URL}
                  target="_blank"
                  rel="noopener noreferrer"
                  className="inline-flex items-center gap-2 text-sm font-medium text-[#d6a85f] transition-colors hover:text-[#e3bd7c]"
                >

                  <Navigation className="h-4 w-4" />

                  Voir l'itinéraire

                  <ArrowUpRight className="h-3.5 w-3.5" />

                </a>

              </li>


            </ul>

          </div>


        </div>




        <div className="my-10 h-px bg-white/10" />



        {/* BOTTOM */}

        <div className="flex flex-col gap-5 text-xs text-white/40 md:flex-row md:items-center md:justify-between">


          <p>
            © {new Date().getFullYear()} Happy Hours.{" "}
            {t("footer.rights")}
          </p>



          <div className="flex flex-wrap items-center gap-5">


            <Link
              href="/menu"
              className="transition-colors hover:text-[#d6a85f]"
            >
              La Carte
            </Link>


            <Link
              href="/reservation"
              className="transition-colors hover:text-[#d6a85f]"
            >
              Réservation
            </Link>


            <a
              href={WHATSAPP_URL}
              target="_blank"
              rel="noopener noreferrer"
              className="inline-flex items-center gap-1.5 transition-colors hover:text-[#d6a85f]"
            >

              <MessageCircle className="h-3.5 w-3.5" />

              WhatsApp

            </a>


          </div>


        </div>


      </div>


    </footer>
  );
}