<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@yield('title', 'Admin') — Pirras</title>
    <link href="https://fonts.googleapis.com/css2?family=Syne:wght@600;700&family=DM+Sans:wght@400;500;600&display=swap" rel="stylesheet">
    <style>
        :root {
            --orange: #f05a1a;
            --bg: #f6f2ed;
            --card: #fff;
            --line: #e7eaee;
            --text: #101418;
            --muted: #5f6b76;
        }

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

        body {
            font-family: "DM Sans", sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.55;
            min-height: 100vh;
        }

        a {
            color: var(--orange);
            text-decoration: none;
            font-weight: 600;
        }

        a:hover {
            text-decoration: underline;
        }

        .top {
            background: var(--card);
            border-bottom: 1px solid rgba(240, 90, 26, .15);
            padding: 14px 0;
            position: sticky;
            top: 0;
            z-index: 20;
        }

        .top-inner {
            width: min(1160px, 92%);
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
        }

        .brand {
            font-family: "Syne", sans-serif;
            font-weight: 800;
            font-size: 20px;
            color: var(--text);
        }

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

        nav {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            font-size: 14px;
        }

        nav a {
            color: #334155;
            padding: 6px 10px;
            border-radius: 8px;
        }

        nav a:hover {
            background: rgba(240, 90, 26, .1);
            text-decoration: none;
            color: var(--orange);
        }

        .wrap {
            width: min(1160px, 92%);
            margin: 0 auto;
            padding: 32px 0 48px;
        }

        .flash {
            background: #dcfce7;
            color: #166534;
            padding: 12px 16px;
            border-radius: 10px;
            margin-bottom: 20px;
            font-size: 14px;
        }

        h1 {
            font-family: "Syne", sans-serif;
            font-size: clamp(24px, 3vw, 34px);
            margin-bottom: 8px;
        }

        .muted {
            color: var(--muted);
            font-size: 15px;
            margin-bottom: 24px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 18px;
            border-radius: 10px;
            border: 0;
            font-family: "Syne", sans-serif;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            background: linear-gradient(135deg, var(--orange), #ff7a3d);
            color: #fff;
        }

        .btn.secondary {
            background: #fff;
            color: var(--text);
            border: 1px solid var(--line);
        }

        .card {
            background: var(--card);
            border: 1px solid rgba(240, 90, 26, .12);
            border-radius: 14px;
            padding: 22px;
            box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
        }

        th,
        td {
            text-align: left;
            padding: 10px 12px;
            border-bottom: 1px solid var(--line);
            vertical-align: top;
        }

        th {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: .6px;
            color: var(--muted);
        }

        .pill {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 999px;
            background: #fff3ed;
            color: var(--orange);
            font-size: 12px;
            font-weight: 700;
        }

        label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 6px;
            color: #334155;
        }

        input[type=text],
        input[type=email],
        input[type=datetime-local],
        input[type=number],
        textarea,
        select {
            width: 100%;
            max-width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--line);
            border-radius: 10px;
            font: inherit;
            margin-bottom: 14px;
        }

        textarea {
            min-height: 120px;
            resize: vertical;
        }

        .row-check {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 16px;
        }

        .row-check input {
            width: auto;
            margin: 0;
        }

    </style>
    @stack('head')
</head>
<body>
    <header class="top">
        <div class="top-inner">
            <a class="brand" href="{{ route('dashboard') }}">Pirras<span>'</span> Admin</a>
            <nav>
                <a href="{{ route('dashboard') }}">Tableau de bord</a>
                <a href="{{ route('admin.contents.index') }}">Ressources</a>
                <a href="{{ route('admin.secteurs.index') }}">Secteurs</a>
                <a href="{{ route('admin.contact-messages.index') }}">Messages</a>
                <a href="{{ route('admin.testimonials.index') }}">Temoignages</a>
                <a href="{{ route('admin.settings.edit') }}">Parametres</a>
                <a href="{{ route('ressources.index') }}" target="_blank" rel="noopener">Voir le site</a>
                @auth
                <form action="{{ route('admin.logout') }}" method="post" style="display:inline;margin:0;">
                    @csrf
                    <button type="submit" class="btn secondary" style="padding:8px 14px;font-size:13px;">Déconnexion</button>
                </form>
                @endauth
            </nav>
        </div>
    </header>

    <main class="wrap">
        @if(session('ok'))
        <div class="flash">{{ session('ok') }}</div>
        @endif
        @yield('content')
    </main>
</body>
</html>
