@extends('layouts.public')

@section('title', "Secteurs - Pirras'Associe")
@section('meta_description', "Decouvrez les secteurs accompagnes par Pirras'Associe : BTP, Cosmetique, Medical, Agro, Industrie, E-commerce.")
@php($activeNav = 'secteurs')

@push('styles')
<style>
    :root {
        --orange: #f05a1a;
        --orange-2: #ff7a3d;
        --line: #e7eaee;
        --text: #101418;
        --muted: #5f6b76;
        --shadow: 0 12px 28px rgba(16, 24, 40, .08);
    }

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0
    }

    body {
        font-family: "DM Sans", sans-serif;
        color: var(--text)
    }

    a {
        text-decoration: none;
        color: inherit
    }

    h1,
    h2,
    h3 {
        font-family: "Syne", sans-serif;
        line-height: 1.15
    }

    .container {
        width: min(1160px, 92%);
        margin: 0 auto
    }

    nav {
        position: sticky;
        top: 0;
        z-index: 100;
        background: rgba(255, 255, 255, .92);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid var(--line)
    }

    .nav-wrap {
        height: 74px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px
    }

    .brand {
        font: 800 22px "Syne", sans-serif
    }

    .brand span {
        color: var(--orange)
    }

    .nav-links {
        display: flex;
        align-items: center;
        gap: 14px;
        font-size: 14px;
        color: #2b3540
    }

    .nav-links a {
        padding: 7px 10px;
        border-radius: 8px;
        transition: .2s
    }

    .nav-links a:hover {
        background: #f2f4f7;
        color: var(--orange)
    }

    .nav-dropdown {
        position: relative
    }

    .nav-dropdown-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 10px;
        border-radius: 8px;
        transition: .2s;
        cursor: pointer;
        border: 0;
        background: transparent;
        font: inherit;
        color: inherit
    }

    .nav-dropdown-toggle::after {
        content: "▾";
        font-size: 10px;
        transform: translateY(1px)
    }

    .nav-dropdown:hover .nav-dropdown-toggle,
    .nav-dropdown.open .nav-dropdown-toggle {
        background: #f2f4f7;
        color: var(--orange)
    }

    .nav-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        min-width: 230px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 8px;
        box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
        opacity: 0;
        transform: translateY(6px);
        pointer-events: none;
        transition: .2s;
        z-index: 120
    }

    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown.open .nav-dropdown-menu {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto
    }

    .nav-dropdown-menu a {
        display: block;
        padding: 10px 12px;
        border-radius: 8px;
        color: #334155
    }

    .nav-dropdown-menu a:hover {
        background: #f7f8fb;
        color: var(--orange)
    }

    .hero {
        padding: 96px 0 88px;
        color: #fff;
        background: linear-gradient(120deg, rgba(8, 14, 20, .8), rgba(8, 14, 20, .55)), url("https://images.unsplash.com/photo-1494412651409-8963ce7935a7?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat
    }

    .kicker {
        color: #ffb088;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 10px
    }

    .title {
        font-size: clamp(30px, 4vw, 52px);
        margin-bottom: 12px
    }

    .sub {
        color: #f3f4f6;
        max-width: 760px
    }

    section {
        padding: 84px 0;
        border-bottom: 1px solid var(--line)
    }

    .grid {
        margin-top: 28px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px
    }

    .card {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 22px;
        box-shadow: var(--shadow);
        transition: .2s
    }

    .card:hover {
        transform: translateY(-4px);
        border-color: #ffd7c5
    }

    .sector-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #fff3ed;
        color: var(--orange);
        margin-bottom: 10px
    }

    .sector-icon svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round
    }

    .card h3 {
        font-size: 24px;
        margin-bottom: 8px
    }

    .card p {
        color: var(--muted);
        margin-bottom: 16px
    }

    .card a {
        color: var(--orange);
        font-weight: 700
    }

    footer {
        background: #06090d;
        color: #cbd5e1;
        border-top: 1px solid rgba(255, 255, 255, .08);
        padding: 62px 0 28px
    }

    .footer-grid {
        display: grid;
        grid-template-columns: 1.8fr 1fr 1fr 1fr;
        gap: 34px;
        margin-bottom: 28px
    }

    .footer-brand .brand {
        display: inline-block;
        color: #fff;
        margin-bottom: 14px
    }

    .footer-brand p {
        color: #9ca3af;
        max-width: 360px;
        margin-bottom: 20px
    }

    .footer-flags {
        display: flex;
        gap: 10px;
        color: #d1d5db;
        font-size: 14px;
        letter-spacing: .5px
    }

    .footer-col h4 {
        color: #fff;
        font-size: 17px;
        margin-bottom: 12px
    }

    .footer-col a {
        display: block;
        color: #9ca3af;
        margin-bottom: 8px;
        transition: color .2s
    }

    .footer-col a:hover {
        color: #fff
    }

    .footer-bottom {
        border-top: 1px solid rgba(255, 255, 255, .09);
        padding-top: 18px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #9ca3af;
        font-size: 14px;
        gap: 12px
    }

    @media (max-width:1024px) {
        .nav-links {
            gap: 8px;
            font-size: 13px
        }

        .grid {
            grid-template-columns: repeat(2, minmax(0, 1fr))
        }

        .footer-grid {
            grid-template-columns: 1fr 1fr
        }
    }

    @media (max-width:768px) {
        .nav-links {
            display: none
        }

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

        .footer-grid {
            grid-template-columns: 1fr;
            gap: 24px
        }

        .footer-bottom {
            flex-direction: column;
            text-align: center
        }
    }

</style>
@endpush

@section('content')
<section class="hero">
    <div class="container">
        <div class="kicker"> Secteurs</div>
        <h1 class="title">Nos secteurs d'intervention</h1>
        {{-- <p class="sub">Nous accompagnons les projets a fort potentiel entre la Chine et l'Afrique sur des marches strategiques.</p>  --}}
    </div>
</section>

<section>
    <div class="container">
        {{-- <h2 class="title" style="color:#101418">Grid secteurs</h2>  --}}
        <div class="grid">
            @forelse($secteurs as $item)
            <article class="card">
                <div class="sector-icon" aria-hidden="true">
                    @switch($item->slug)
                    @case('btp')
                    <svg viewBox="0 0 24 24">
                        <path d="M3 21h18"></path>
                        <rect x="5" y="11" width="4" height="10"></rect>
                        <rect x="10" y="7" width="4" height="14"></rect>
                        <rect x="15" y="3" width="4" height="18"></rect>
                    </svg>
                    @break
                    @case('cosmetique')
                    <svg viewBox="0 0 24 24">
                        <rect x="8" y="3" width="8" height="3"></rect>
                        <path d="M7 6h10l-1 15H8L7 6z"></path>
                        <line x1="10" y1="10" x2="14" y2="10"></line>
                    </svg>
                    @break
                    @case('medical')
                    <svg viewBox="0 0 24 24">
                        <rect x="3" y="6" width="18" height="15" rx="2"></rect>
                        <path d="M12 2v8"></path>
                        <path d="M8 10h8"></path>
                        <path d="M12 13v5"></path>
                        <path d="M9.5 15.5h5"></path>
                    </svg>
                    @break
                    @case('agro')
                    <svg viewBox="0 0 24 24">
                        <path d="M12 21s-6-4.2-6-10a6 6 0 0 1 12 0c0 5.8-6 10-6 10z"></path>
                        <path d="M12 7v8"></path>
                        <path d="M9 10c1.8.2 2.6-.8 3-2"></path>
                        <path d="M15 12c-1.7.2-2.6 1-3 2"></path>
                    </svg>
                    @break
                    @case('industrie')
                    <svg viewBox="0 0 24 24">
                        <path d="M3 21V8l7 4V8l7 4V4l4 2v15H3z"></path>
                    </svg>
                    @break
                    @default
                    <svg viewBox="0 0 24 24">
                        <rect x="3" y="5" width="18" height="14" rx="2"></rect>
                        <path d="M8 21h8"></path>
                        <path d="M12 19v2"></path>
                    </svg>
                    @endswitch
                </div>
                <h3>{{ $item->nom }}</h3>
                <p>{{ $item->description }}</p>
                <a href="{{ route('secteurs.show', $item) }}">Voir la page secteur →</a>
            </article>
            @empty
            <p class="sub" style="color:#5f6b76;">Aucun secteur publie pour le moment. Ajoutez des secteurs depuis l'administration.</p>
            @endforelse
        </div>
    </div>
</section>
@endsection
