<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="description" content="Educas est une application de gestion d'ecole dans son ensemble">
    <meta name="author" content="Jean-Marius Yao">
    <title>Autorisation de cours</title>
</head>
<style>
    @page {
        margin: 50px 25px 50px 25px; /* top, right, bottom, left */
    }

    body {
        font-size: .875em;
        overflow-x: hidden;
        color: #353c4e;
        font-family: "Open Sans", sans-serif;
    }
    .watermark {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-50deg);
        font-size: 100px;
        color: rgba(0, 0, 0, 0.05);
        z-index: -1;
        white-space: nowrap;
        pointer-events: none;
    }
    #header {
        position: fixed;
        border-bottom: 1px solid gray;
        left: 0;
        right: 0;
        top: -40px;
        text-align: center;
        font-size: 10px;
        color: #555;
    }
    #footer {
        position: fixed;
        bottom: -60px;
        border-top: 1px solid gray;
        left: 0;
        right: 0;
        height: 40px;
        text-align: center;
        font-size: 12px;
    }
</style>
<body>
    <div class="watermark">FICHE AUTORISATION</div>
    
    <header id="header">
    <table style="width: 100%; margin: 0px auto; padding:0%">
      <tbody>
        <tr>
          <td style="width: 50%">
            <table style="width: 100%">
              <tbody>
                <tr>
                  <td>
                    <div style="text-align: center; font-size: 10px">Ministère de l'Education Nationale, de l'Enseignement <br> Technique et de la   Formation Professionnelle</div>
                  </td>
                </tr>
              </tbody>
            </table>
          </td>
          <td style="width: 50%">
            <table style="width: 100%">
              <tbody>
                <tr>
                  <td>
                    <div style="text-align: center; font-size: 10px;">
                      <b>REPUBLIQUEDE COTE D'IVOIRE</b><br>
                      <i>Union - Discipline - Travail</i>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </td>
        </tr>
      </tbody>
    </table>
  </header>
    
    <section style="margin: 30px auto;">
        <div style="margin-top: 25px; padding-top: 10%; paddin-bottom: 15px">
            <div style="margin-top: 20px; padding-bottom: 20px">
                <div style="margin-top: 35px; text-align: center; font-size:21px; text-decoration: underline;">
                    <b>AUTORISATION DES COURS</b>
                </div>
            </div>
            <div style="padding-top: 10%;  margin-top: 5px;">
                <div style="font-size: 17px;">
                    <p style="text-align: center"> Autorisation au cours au titre de l'année 2025-2026 au sein de l'etablissement.</p>
                    <div style="padding-left: 10%">
                       <p> Matricule : <b>{{mb_strtoupper($data->student->matricule)}}</b></p>
                        <p>Nom Et Prénoms : <b>{{mb_strtoupper($data->student->first_name).' '.ucwords($data->student->last_name)}}</b></p>
                        <p>Genre : <b>{{ucfirst($data->student->sexe == 'F' ? 'Féminin':'Masculin')}}</b></p>
                        <p>Né{{$data->student->sexe == 'F' ? 'e':''}} le : <b>{{date('d/m/Y', strtotime($data->student->date_birth)).' à '.ucwords($data->student->place_birth)}}</b></p>
                        <p>Classe : <b>{{$data->classe->libelle}}</b></p>
                    
                        <p>Inscrit{{$data->student->sexe == 'F' ? 'e':''}} le <b>{{date('d/m/Y', strtotime($data->created_at))}}</b></p>
                    </div>
                </div>
                <div style="float: right; margin-top: 20%">
                    Directeur Des Etudes
                </div>
            </div>
        </div>
    </section>
    
    <footer id="footer">
        <table style="width: 100%">
            <tbody>
                <tr>
                    <td style="width: 50%">
                        <i style="text-align: left; font-size: 12px; margin:0%">{{ $school->address_email }} / {{ $school->phon_school }}</i>
                    </td>
                    <td style="width: 25%">
                        <i style="text-align: center; font-size: 12px; margin:0%">{{ strtoupper($data->classe->libelle).' -- '.random_int(1000, 5000).' - 0'.$school->school_id }}</i>
                    </td>
                    <td style="width: 25%">
                        <i style="text-align: right; float:right; font-size: 12px; margin:0%">{{date('Y-m-d H:i:s')}}</i>
                    </td>
                </tr>
            </tbody>
        </table>
    </footer>
</body>
</html>