<!DOCTYPE html>
<html>

<head>
    <title>PDF Template</title>
    <style>
        /* Global styles for the PDF */
        body {
            font-family: Arial, sans-serif;
        }

        .header {
            text-align: center;
        }

        .footer {
            position: fixed;
            bottom: 0;
            width: 100%;
            text-align: center;
        }

        .logo {
            max-width: 100px;
            max-height: 100px;
            margin: 10px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th,
        td {
            border: 1px solid black;
            padding: 8px;
            font-size: 12px
        }
    </style>
</head>

<body>
    <div class="header">

    </div>
    <div style="width: 100%; height:50px">
        <h4 style="float: right"> {{ $dossier->typeexpertise->type ?? null }} / {{ $dossier->mode->mode ?? null }}</h4>
        <h4 style="float: left">{{ $dossier->company->company ?? null }}</h4>
    </div>
    <table style="margin-bottom: 10px">
        <thead>
            <tr>
                <th>{{ $dossier->ref }}</th>
            </tr>
        </thead>
    </table>

    <table>
        <thead>
            <tr>
                <th>Assuré</th>
            </tr>
        </thead>
    </table>
    <table>

        <tbody>
            <tr>
                <td>Nom : {{ $dossier->insured->name ?? null }}</td>
                <td>Tel : {{ $dossier->insured->telephone ?? null }}</td>
                <td>Matricule : {{ $dossier->new_matricule ?? $dossier->matricule }}</td>
            </tr>
            <tr>
                <td>Numero Sinistre : {{ $dossier->numero_sinistre ?? null }}</td>
                <td>Date Sinistre : {{ $dossier->date_sinistre ?? null }}</td>
                <td>Intermidiaire : {{ $dossier->intermidiaire->company ?? null }}</td>
            </tr>
            <tr>
                <td>Numero Police :{{ $dossier->numero_police ?? null }}</td>
                <td>Vehicule : {{ $dossier->vehiculemodel->brand->brand ?? null }} /
                    {{ $dossier->vehiculemodel->name ?? null }}</td>
                <td>MEC : {{ $dossier->date_circulation ?? null }}</td>
            </tr>
        </tbody>
    </table>

    <table style="margin-top: 10px">
        <thead>
            <tr>
                <th>Adversaire</th>
            </tr>
        </thead>
    </table>
    <table>

        <tbody>
            <tr>
                <td>Nom : {{ $dossier->opponent->name ?? null }}</td>
                <td>Tel : {{ $dossier->opponent->telephone ?? null }}</td>
                <td>Matricule : {{ $dossier->opponent->matricule ?? null }}</td>
            </tr>
            <tr>
                <td>Assurance : {{ $dossier->opponent->company->company ?? null }}</td>
                <td>Police : {{ $dossier->opponent->numero_attestation ?? null }}</td>
                <td>Vehicule : {{ $dossier->opponent->vehiculemodel->brand->brand ?? null }} /
                    {{ $dossier->opponent->vehiculemodel->name ?? null }}</td>
            </tr>

        </tbody>
    </table>

</body>

</html>
