#!/bin/bash

# Repertoire cible 
TARGET_DIR="."

# Contenu HTML de la page de maintenance
cat > "$TARGET_DIR/index.html" <<EOF
<!DOCTYPE html>
<html lang="fr">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Site en maintenance</title>
  <style>
    body {
      margin: 0;
      padding: 0;
      font-family: sans-serif;
      background-color: #f2f2f2;
      color: #333;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      text-align: center;
    }
    .container {
      max-width: 600px;
      padding: 20px;
      background: white;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    h1 {
      font-size: 2rem;
      margin-bottom: 10px;
      color: #cc0000;
    }
    p {
      font-size: 1.1rem;
    }
    .logo {
      max-width: 150px;
      margin-bottom: 20px;
    }
  </style>
</head>
<body>
  <div class="container">
    <!-- <img src="logo.png" alt="Logo" class="logo" /> -->
    <h1>Site en maintenance</h1>
    <p>Nous effectuons actuellement une maintenance programmée.<br>
    Merci de revenir dans quelques instants.</p>
  </div>
</body>
</html>
EOF

echo "Fichier de maintenance cree dans $TARGET_DIR/index.html"
