Claude - Interface IA Bootstrap 5

🏷️ Extraits de code HTML 📅 06/04/2026 11:00:00 👤 Mezgani said
Bootstrap Bootstrap5 Ai Claude Chat Html

Template Bootstrap 5 d'interface conversationnelle inspiree de Claude avec mise en page sobre et zone de reponse.

<!DOCTYPE html>
<html lang="fr">
<head>
  <meta charset="UTF-8" />
  <meta name="copyright" content="MEZGANI Said" />
  <meta name="author" content="AngularForAll" />
  <meta name="robots" content="noindex, nofollow" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Template AI Claude Bootstrap 5 | AngularForAll</title>
<!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Bootstrap Icons -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
  
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', serif;
      background: #f5f2eb;
      height: 100vh;
      overflow: hidden;
      color: #2c2c2c;
    }

    /* Claude utilise un layout très épuré */
    .app-container {
      display: flex;
      height: 100vh;
    }

    /* Sidebar - Style Claude */
    .sidebar {
      width: 260px;
      background: #faf8f4;
      border-right: 1px solid #e8e4dc;
      display: flex;
      flex-direction: column;
    }

    .sidebar-header {
      padding: 20px 16px;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 1.2rem;
      font-weight: 500;
      color: #d97706;
      margin-bottom: 20px;
    }

    .logo i {
      font-size: 1.5rem;
    }

    .new-chat-btn {
      background: #d97706;
      color: white;
      border: none;
      border-radius: 24px;
      padding: 10px 16px;
      font-size: 0.9rem;
      font-weight: 500;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 100%;
      transition: all 0.2s;
      cursor: pointer;
    }

    .new-chat-btn:hover {
      background: #b45309;
    }

    .chat-history {
      flex: 1;
      overflow-y: auto;
      padding: 8px;
    }

    .history-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      color: #525252;
      font-size: 0.9rem;
      cursor: pointer;
      transition: all 0.15s;
    }

    .history-item:hover {
      background: #f0ece4;
    }

    .history-item i {
      color: #a3a3a3;
    }

    /* Zone principale */
    .main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      background: #f5f2eb;
    }

    /* Header minimal */
    .chat-header {
      padding: 16px 24px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }

    .model-badge {
      background: #f0ece4;
      padding: 6px 14px;
      border-radius: 20px;
      font-size: 0.8rem;
      color: #525252;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .model-badge i {
      color: #d97706;
    }

    /* Zone des messages */
    .messages-container {
      flex: 1;
      overflow-y: auto;
      padding: 16px 24px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .message {
      display: flex;
      gap: 16px;
      max-width: 750px;
      margin: 0 auto;
      width: 100%;
    }

    .message-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-weight: 400;
    }

    .message.user .message-avatar {
      background: #d4a373;
      color: white;
    }

    .message.assistant .message-avatar {
      background: #d97706;
      color: white;
    }

    .message-content {
      flex: 1;
      line-height: 1.7;
      color: #2c2c2c;
      font-size: 1rem;
    }

    /* Claude utilise des bulles minimalistes */
    .message.assistant .message-content p {
      margin: 0;
      padding: 4px 0;
    }

    .message.user .message-content {
      background: #f0ece4;
      padding: 12px 18px;
      border-radius: 20px;
    }

    /* Zone de saisie - Style Claude */
    .input-container {
      padding: 20px 24px 28px;
    }

    .input-wrapper {
      max-width: 750px;
      margin: 0 auto;
      display: flex;
      align-items: flex-end;
      gap: 12px;
      background: #ffffff;
      border-radius: 28px;
      padding: 8px 8px 8px 20px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
      border: 1px solid #e8e4dc;
    }

    .input-wrapper textarea {
      flex: 1;
      border: none;
      background: transparent;
      resize: none;
      padding: 10px 0;
      font-size: 0.95rem;
      line-height: 1.5;
      max-height: 200px;
      outline: none;
    }

    .input-wrapper textarea::placeholder {
      color: #a3a3a3;
    }

    .input-actions {
      display: flex;
      gap: 2px;
    }

    .input-actions button {
      background: none;
      border: none;
      color: #737373;
      padding: 10px 12px;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.15s;
    }

    .input-actions button:hover {
      background: #f0ece4;
      color: #2c2c2c;
    }

    .send-btn {
      background: #d97706 !important;
      color: white !important;
    }

    .send-btn:hover {
      background: #b45309 !important;
    }

    /* Welcome screen */
    .welcome-screen {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 24px;
      text-align: center;
    }

    .welcome-logo {
      font-size: 3.5rem;
      margin-bottom: 16px;
    }

    .welcome-screen h1 {
      font-size: 2.2rem;
      font-weight: 400;
      margin-bottom: 8px;
      color: #2c2c2c;
    }

    .welcome-screen p {
      color: #737373;
      margin-bottom: 40px;
      font-size: 1rem;
    }

    .examples {
      display: flex;
      flex-direction: column;
      gap: 12px;
      max-width: 500px;
    }

    .example-item {
      background: #faf8f4;
      border: 1px solid #e8e4dc;
      border-radius: 16px;
      padding: 16px 20px;
      text-align: left;
      cursor: pointer;
      transition: all 0.15s;
    }

    .example-item:hover {
      background: #f0ece4;
      border-color: #d4a373;
    }

    .example-item i {
      color: #d97706;
      margin-right: 12px;
    }

    .claude-footer {
      margin-top: 40px;
      color: #a3a3a3;
      font-size: 0.8rem;
    }

    /* Responsive */
    @media (max-width: 768px) {
      .sidebar {
        display: none;
      }
    }
  </style>
</head>
<body>

<div class="app-container">
  
  <!-- Sidebar -->
  <div class="sidebar">
    <div class="sidebar-header">
      <div class="logo">
        <i class="bi bi-chat-heart"></i>
        <span>Claude</span>
      </div>
      <button class="new-chat-btn" onclick="newChat()">
        <i class="bi bi-plus-lg"></i> Nouveau chat
      </button>
    </div>
    
    <div class="chat-history">
      <div class="history-item" onclick="loadChat('Discussion philosophique')">
        <i class="bi bi-chat"></i>
        <span>Discussion philosophique</span>
      </div>
      <div class="history-item" onclick="loadChat('Aide à l\'écriture')">
        <i class="bi bi-pencil"></i>
        <span>Aide à l'écriture</span>
      </div>
      <div class="history-item" onclick="loadChat('Analyse de texte')">
        <i class="bi bi-file-text"></i>
        <span>Analyse de texte</span>
      </div>
    </div>
  </div>
  
  <!-- Zone principale -->
  <div class="main-content">
    <div class="chat-header">
      <div class="model-badge">
        <i class="bi bi-star-fill"></i>
        <span>Claude 3.5 Sonnet</span>
      </div>
    </div>
    
    <!-- Welcome Screen -->
    <div class="welcome-screen" id="welcomeScreen">
      <div class="welcome-logo">🧡</div>
      <h1>Bonjour, je suis Claude</h1>
      <p>Comment puis-je vous aider aujourd'hui ?</p>
      
      <div class="examples">
        <div class="example-item" onclick="sendSuggestion('Aide-moi à rédiger une lettre')">
          <i class="bi bi-envelope"></i>
          Aide-moi à rédiger une lettre
        </div>
        <div class="example-item" onclick="sendSuggestion('Explique-moi un concept complexe')">
          <i class="bi bi-lightbulb"></i>
          Explique-moi un concept complexe
        </div>
        <div class="example-item" onclick="sendSuggestion('Analyse ce document')">
          <i class="bi bi-file-pdf"></i>
          Analyse ce document
        </div>
      </div>
      
      <div class="claude-footer">
        Claude peut faire des erreurs. Vérifiez les informations importantes.
      </div>
    </div>
    
    <!-- Messages container -->
    <div class="messages-container" id="messagesContainer" style="display: none;"></div>
    
    <!-- Zone de saisie -->
    <div class="input-container">
      <div class="input-wrapper">
        <textarea placeholder="Écrivez votre message..." rows="1" id="messageInput"></textarea>
        <div class="input-actions">
          <button onclick="attachFile()"><i class="bi bi-paperclip"></i></button>
          <button class="send-btn" onclick="sendMessage()"><i class="bi bi-arrow-up"></i></button>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
  let isFirstMessage = true;
  
  function newChat() {
    isFirstMessage = true;
    document.getElementById('welcomeScreen').style.display = 'flex';
    document.getElementById('messagesContainer').style.display = 'none';
    document.getElementById('messageInput').value = '';
  }
  
  function loadChat(name) {
    console.log('Chargement:', name);
  }
  
  function attachFile() {
    alert('Joindre un fichier');
  }
  
  function sendSuggestion(text) {
    document.getElementById('messageInput').value = text;
    sendMessage();
  }
  
  function sendMessage() {
    const input = document.getElementById('messageInput');
    const text = input.value.trim();
    
    if (!text) return;
    
    if (isFirstMessage) {
      document.getElementById('welcomeScreen').style.display = 'none';
      document.getElementById('messagesContainer').style.display = 'flex';
      isFirstMessage = false;
    }
    
    addMessage(text, 'user');
    input.value = '';
    
    setTimeout(() => {
      addMessage("Je comprends votre demande. Je vais vous répondre de manière réfléchie et nuancée. (Démonstration de l'interface Claude)", 'assistant');
    }, 1000);
  }
  
  function addMessage(text, sender) {
    const container = document.getElementById('messagesContainer');
    
    const messageDiv = document.createElement('div');
    messageDiv.className = `message ${sender}`;
    
    messageDiv.innerHTML = `
      <div class="message-avatar">
        ${sender === 'user' ? 'M' : '🧡'}
      </div>
      <div class="message-content">
        ${sender === 'user' ? text : `<p>${text}</p>`}
      </div>
    `;
    
    container.appendChild(messageDiv);
    container.scrollTop = container.scrollHeight;
  }
  
  document.getElementById('messageInput').addEventListener('input', function() {
    this.style.height = 'auto';
    this.style.height = Math.min(this.scrollHeight, 200) + 'px';
  });
  
  document.getElementById('messageInput').addEventListener('keydown', function(e) {
    if (e.key === 'Enter' && !e.shiftKey) {
      e.preventDefault();
      sendMessage();
    }
  });
  
  console.log('✅ Interface style Claude - Prête !');
</script>

</body>
</html>

Ouvrir cet aperçu dans un nouvel onglet du navigateur

🔗 Ouvrir dans le navigateur