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

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
      background: #f2f3f4;
      height: 100vh;
      display: flex;
      flex-direction: column;
      /* iOS safe area */
      padding-top: var(--safe-top, 0);
      padding-bottom: var(--safe-bottom, 0);
    }

    /* Header avec logo exact */
    .header {
      background: #1A2942;
      padding: 20px 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 2px solid #C5A572;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
      /* iOS safe area */
      padding-top: max(20px, var(--safe-top, 0px));
    }

    /* Mode Selector dans le header - Style Segmented Control */
    .header .mode-selector {
      display: flex;
      background: rgba(0, 0, 0, 0.2); /* Fond sombre discret */
      padding: 4px;
      border-radius: 12px; /* Plus arrondi */
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .header .mode-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 14px;
      background: transparent;
      color: rgba(255, 255, 255, 0.6);
      border: none;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      white-space: nowrap;
      position: relative;
      letter-spacing: 0.3px;
    }

    .header .mode-btn:hover {
      color: white;
    }

    .header .mode-btn.active {
      background: #C5A572;
      color: #1A2942;
      font-weight: 700;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .header .mode-btn i {
      font-size: 13px;
    }

    .logo-section {
      display: flex;
      align-items: center;
      gap: 20px;
    }

    /* LOGO IFG avec GLOBE */
    .logo {
      width: 60px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    /* Globe stylisé */
    .globe {
      width: 40px;
      height: 40px;
      border: 2.5px solid #C5A572;
      border-radius: 50%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Méridiens verticaux */
    .globe::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 20px;
      height: 40px;
      border: 1.5px solid #C5A572;
      border-radius: 50%;
      border-left: none;
      border-right: none;
      opacity: 0.6;
    }

    /* Équateur horizontal */
    .globe::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 1.5px;
      background: #C5A572;
      opacity: 0.6;
    }

    /* Symboles monétaires qui changent */
    .currency-rotating {
      font-size: 20px;
      font-weight: 900;
      color: #C5A572;
      z-index: 1;
      display: inline-block;
      animation: spin3d 3s linear infinite;
      transform-style: preserve-3d;
    }

    @keyframes spin3d {
      from { transform: rotateY(0deg); }
      to { transform: rotateY(360deg); }
    }

    .brand-info {
      color: white;
    }

    .brand-name {
      font-size: 28px;
      font-weight: 700;
      letter-spacing: -0.5px;
    }

    .brand-tagline {
      font-size: 12px;
      color: #C5A572;
      text-transform: uppercase;
      letter-spacing: 2px;
      font-weight: 600;
    }

    .header-badge {
      background: linear-gradient(135deg, #C5A572, #b39563);
      color: #1A2942;
      padding: 10px 20px;
      border-radius: 25px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    /* Burger Menu */
    .burger-btn {
      background: rgba(197, 165, 114, 0.1);
      border: 1px solid #C5A572;
      color: #C5A572;
      padding: 10px 15px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .burger-btn:hover {
      background: rgba(197, 165, 114, 0.2);
    }

    .burger-menu {
      position: absolute;
      right: 40px;
      top: 80px;
      width: 250px;
      background: white;
      border-radius: 12px;
      box-shadow: 0 8px 30px rgba(0,0,0,0.15);
      border: 1px solid #e5e7eb;
      z-index: 1000;
    }

    .burger-menu.hidden {
      display: none;
    }

    .menu-header {
      padding: 16px 20px;
      border-bottom: 1px solid #e5e7eb;
    }

    .menu-email {
      font-size: 14px;
      font-weight: 600;
      color: #1A2942;
      margin-bottom: 4px;
    }

    .menu-label {
      font-size: 11px;
      color: #666;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .menu-item {
      display: block;
      padding: 14px 20px;
      color: #1A2942;
      text-decoration: none;
      transition: background 0.2s;
      border-bottom: 1px solid #f2f3f4;
    }

    .menu-item:hover {
      background: #f2f3f4;
    }

    .menu-item i {
      margin-right: 10px;
      width: 16px;
    }

    .menu-logout {
      width: 100%;
      padding: 14px 20px;
      background: none;
      border: none;
      color: #dc2626;
      text-align: left;
      cursor: pointer;
      transition: background 0.2s;
      font-size: 14px;
    }

    .menu-logout:hover {
      background: #fef2f2;
    }

    /* Export PDF Modal */
    .export-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 3000;
      backdrop-filter: blur(4px);
    }

    .export-modal.hidden {
      display: none;
    }

    .export-modal-content {
      background: white;
      border-radius: 16px;
      padding: 30px;
      max-width: 500px;
      width: 90%;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .export-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 24px;
    }

    .export-modal-header h3 {
      font-size: 20px;
      color: #1A2942;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .export-modal-close {
      background: none;
      border: none;
      font-size: 24px;
      color: #666;
      cursor: pointer;
      padding: 0;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      transition: all 0.2s;
    }

    .export-modal-close:hover {
      background: #f2f3f4;
      color: #1A2942;
    }

    .export-form-group {
      margin-bottom: 20px;
    }

    .export-form-group label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: #1A2942;
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .export-form-group input[type="text"],
    .export-form-group input[type="file"] {
      width: 100%;
      padding: 12px 16px;
      border: 2px solid #e5e7eb;
      border-radius: 8px;
      font-size: 14px;
      font-family: inherit;
      transition: all 0.2s;
    }

    .export-form-group input[type="text"]:focus {
      outline: none;
      border-color: #C5A572;
      box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.1);
    }

    .export-logo-preview {
      margin-top: 12px;
      padding: 16px;
      background: #f2f3f4;
      border-radius: 8px;
      text-align: center;
    }

    .export-logo-preview img {
      max-width: 200px;
      max-height: 80px;
      object-fit: contain;
    }

    .export-logo-preview.hidden {
      display: none;
    }

    .export-actions {
      display: flex;
      gap: 12px;
      margin-top: 24px;
    }

    .export-btn {
      flex: 1;
      padding: 14px 24px;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .export-btn-primary {
      background: linear-gradient(135deg, #1A2942, #234876);
      color: white;
    }

    .export-btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(26, 41, 66, 0.3);
    }

    .export-btn-secondary {
      background: #f2f3f4;
      color: #1A2942;
    }

    .export-btn-secondary:hover {
      background: #e5e7eb;
    }

    /* History Panel */
    .history-panel {
      position: fixed;
      top: 0;
      right: 0;
      width: 400px;
      height: 100vh;
      background: white;
      box-shadow: -4px 0 20px rgba(0,0,0,0.15);
      z-index: 2000;
      display: flex;
      flex-direction: column;
      transform: translateX(0);
      transition: transform 0.3s ease;
    }

    .history-panel.hidden {
      transform: translateX(100%);
    }

    .history-header {
      background: #1A2942;
      color: white;
      padding: 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .history-header h3 {
      font-size: 16px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .history-close {
      background: none;
      border: none;
      color: white;
      font-size: 20px;
      cursor: pointer;
      padding: 5px;
      opacity: 0.8;
      transition: opacity 0.2s;
    }

    .history-close:hover {
      opacity: 1;
    }

    .history-content {
      flex: 1;
      overflow-y: auto;
      padding: 20px;
    }

    .history-loading {
      text-align: center;
      padding: 40px 20px;
      color: #666;
    }

    .history-loading i {
      font-size: 24px;
      margin-bottom: 10px;
      color: #C5A572;
    }

    .history-item {
      padding: 15px;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      margin-bottom: 12px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .history-item:hover {
      background: #f9fafb;
      border-color: #C5A572;
    }

    .history-item-date {
      font-size: 11px;
      color: #666;
      margin-bottom: 6px;
    }

    .history-item-title {
      font-size: 13px;
      font-weight: 600;
      color: #1A2942;
      margin-bottom: 4px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .history-item-preview {
      font-size: 12px;
      color: #666;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .history-empty {
      text-align: center;
      padding: 60px 20px;
      color: #666;
    }

    .history-empty i {
      font-size: 48px;
      color: #e5e7eb;
      margin-bottom: 15px;
    }

    @media (max-width: 768px) {
      .history-panel {
        width: 100%;
      }
    }

    /* Chat Container */
    .chat-container {
      flex: 1;
      display: flex;
      flex-direction: column;
      max-width: 1200px;
      width: 100%;
      margin: 30px auto;
      background: white;
      border-radius: 16px;
      box-shadow: 0 4px 20px rgba(26, 41, 66, 0.1);
      overflow: hidden;
    }

    .chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 30px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .message {
      display: flex;
      gap: 15px;
      max-width: 80%;
      animation: slideIn 0.3s ease;
    }

    @keyframes slideIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .message.user {
      margin-left: auto;
      flex-direction: row-reverse;
    }

    .message-avatar {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 16px;
      flex-shrink: 0;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      transition: all 0.3s ease;
    }

    .message-avatar:hover {
      transform: scale(1.05);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    .message.assistant .message-avatar {
      background: linear-gradient(135deg, #1A2942, #234876);
      color: white;
      position: relative;
      overflow: visible;
      border: 2px solid #C5A572;
    }

    /* Globe dans l'avatar assistant */
    .avatar-globe {
      width: 24px;
      height: 24px;
      border: 2px solid #C5A572;
      border-radius: 50%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .avatar-globe::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 12px;
      height: 24px;
      border: 1px solid #C5A572;
      border-radius: 50%;
      border-left: none;
      border-right: none;
      opacity: 0.6;
    }

    .avatar-globe::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 1px;
      background: #C5A572;
      opacity: 0.6;
    }

    .avatar-currency {
      font-size: 12px;
      font-weight: 900;
      color: #C5A572;
      z-index: 1;
      display: inline-block;
      animation: spin3d 3s linear infinite;
      transform-style: preserve-3d;
    }

    .message.user .message-avatar {
      background: linear-gradient(135deg, #C5A572, #b39563);
      color: #1A2942;
      border: 2px solid #1A2942;
      font-weight: 900;
    }

    .message-content {
      padding: 0;
      border-radius: 16px;
      font-size: 15px;
      line-height: 1.6;
      position: relative;
    }

    .message-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 20px;
      background: linear-gradient(135deg, rgba(26, 41, 66, 0.03), rgba(197, 165, 114, 0.03));
      border-bottom: 1px solid rgba(197, 165, 114, 0.2);
      border-radius: 16px 16px 0 0;
      margin-bottom: 12px;
    }
    
    /* Masquer le header pour les messages utilisateur */
    .message.user .message-header {
      display: none;
    }
    
    /* Réduire le padding pour les messages utilisateur */
    .message.user .message-body {
      padding: 12px 16px !important;
    }

    .message-header-info {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .message-role {
      font-size: 13px;
      font-weight: 700;
      color: #1A2942;
      text-transform: uppercase;
      letter-spacing: 1px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .message-role::before {
      content: '';
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #C5A572;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.5; transform: scale(0.8); }
    }

    .message-timestamp {
      font-size: 11px;
      color: #666;
      font-weight: 500;
    }

    .message-actions {
      display: flex;
      gap: 8px;
    }

    .message-action-btn {
      background: none;
      border: 1px solid rgba(197, 165, 114, 0.3);
      color: #1A2942;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 11px;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 4px;
      font-weight: 600;
    }

    .message-action-btn:hover {
      background: rgba(197, 165, 114, 0.1);
      border-color: #C5A572;
      transform: translateY(-1px);
    }

    .message-action-btn i {
      font-size: 12px;
    }

    .message.assistant .message-content {
      background: white;
      color: #1A2942;
      border: 1px solid #e5e7eb;
      box-shadow: 0 2px 8px rgba(26, 41, 66, 0.05);
    }

    .message.user .message-content {
      background: #234876;
      color: white;
      padding: 18px 22px;
    }

    /* Réponse structurée */
    .answer-header {
      background: linear-gradient(135deg, #1A2942, #234876);
      color: white;
      padding: 20px 24px;
      border-radius: 16px 16px 0 0;
      border-bottom: 3px solid #C5A572;
    }

    .answer-header h3 {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 12px;
      color: #C5A572;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .answer-summary {
      font-size: 17px;
      line-height: 1.8;
      font-weight: 500;
    }

    .answer-body {
      padding: 12px;
    }

    .answer-section {
      margin-bottom: 12px;
    }

    .answer-section h4 {
      color: #1A2942;
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 2px solid #C5A572;
    }

    .answer-section p {
      color: #234876;
      line-height: 1.7;
      margin-bottom: 12px;
    }

    .answer-section ul {
      list-style: none;
      padding-left: 0;
    }

    .answer-section li {
      padding: 8px 0 8px 24px;
      position: relative;
      color: #234876;
    }

    .answer-section li::before {
      content: '→';
      position: absolute;
      left: 0;
      color: #C5A572;
      font-weight: 700;
    }

    .key-points {
      background: #f2f3f4;
      padding: 16px 20px;
      border-radius: 12px;
      border-left: 4px solid #C5A572;
      margin: 16px 0;
    }

    .key-points h5 {
      color: #1A2942;
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .key-points ul {
      margin: 0;
    }

    /* Input Area */
    .input-area {
      padding: 25px 30px;
      border-top: 2px solid #f2f3f4;
      background: white;
    }

    .input-wrapper {
      display: flex;
      gap: 15px;
      align-items: center;
    }

    #userInput {
      flex: 1;
      border: 2px solid #e5e7eb;
      border-radius: 12px;
      padding: 16px 20px;
      font-size: 15px;
      font-family: inherit;
      resize: none;
      min-height: 60px;
      max-height: 200px;
      transition: all 0.2s;
    }

    #userInput:focus {
      outline: none;
      border-color: #C5A572;
      box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.1);
    }

    #sendBtn {
      background: linear-gradient(135deg, #1A2942, #234876);
      color: white;
      border: none;
      padding: 18px 35px;
      border-radius: 12px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }

    #sendBtn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(26, 41, 66, 0.3);
    }

    #sendBtn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* Welcome Screen */
    .welcome {
      text-align: center;
      padding: 60px 40px;
    }

    .welcome h2 {
      font-size: 32px;
      color: #1A2942;
      margin-bottom: 15px;
      font-weight: 700;
    }

    .welcome p {
      color: #234876;
      font-size: 16px;
      margin-bottom: 40px;
    }

    .examples {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 15px;
      max-width: 900px;
      margin: 0 auto;
    }

    .example-card {
      background: #f2f3f4;
      padding: 20px;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s;
      border: 2px solid transparent;
      text-align: left;
    }

    .example-card:hover {
      background: white;
      border-color: #C5A572;
      transform: translateY(-3px);
      box-shadow: 0 6px 15px rgba(26, 41, 66, 0.1);
    }

    .example-card .icon {
      font-size: 24px;
      margin-bottom: 10px;
    }

    .example-card .title {
      font-weight: 600;
      color: #1A2942;
      margin-bottom: 5px;
    }

    .example-card .desc {
      font-size: 13px;
      color: #234876;
    }

    .loading {
      display: flex;
      gap: 8px;
      padding: 15px;
    }

    .loading-dot {
      width: 10px;
      height: 10px;
      background: #C5A572;
      border-radius: 50%;
      animation: bounce 1.4s infinite ease-in-out both;
    }

    .loading-dot:nth-child(1) { animation-delay: -0.32s; }
    .loading-dot:nth-child(2) { animation-delay: -0.16s; }

    @keyframes bounce {
      0%, 80%, 100% { transform: scale(0); }
      40% { transform: scale(1); }
    }

    .loading-text {
      display: inline-block;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    .sources {
      margin-top: 15px;
      padding-top: 15px;
      border-top: 1px solid #e5e7eb;
      font-size: 13px;
      color: #234876;
    }

    .source-link {
      color: #234876;
      text-decoration: none;
      border-bottom: 1px solid transparent;
      transition: all 0.2s;
    }

    .source-link:hover {
      color: #C5A572;
      border-bottom-color: #C5A572;
    }

    /* Mode Selector */
    .mode-selector {
      padding: 16px 20px;
      background: #f9fafb;
      border-top: 1px solid #e5e7eb;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .mode-selector-label {
      font-size: 13px;
      font-weight: 600;
      color: #1A2942;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .mode-toggle {
      display: flex;
      background: white;
      border: 2px solid #e5e7eb;
      border-radius: 8px;
      overflow: hidden;
    }

    .mode-btn {
      padding: 8px 20px;
      background: white;
      border: none;
      color: #234876;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .mode-btn:hover {
      background: #f9fafb;
    }

    .mode-btn.active {
      background: linear-gradient(135deg, #1A2942, #234876);
      color: white;
    }

    .mode-btn i {
      font-size: 16px;
    }

    /* RESPONSIVE MOBILE */
    @media (max-width: 768px) {
      /* Header mobile */
      .header {
        padding: 12px 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }
      
      .logo-section {
        width: auto;
        justify-content: flex-start;
        gap: 12px;
      }
      
      .logo {
        width: 40px;
        height: 40px;
      }
      
      .globe {
        width: 32px;
        height: 32px;
      }
      
      .currency-rotating {
        font-size: 16px;
      }
      
      .brand-name {
        font-size: 18px;
      }
      
      .brand-tagline {
        font-size: 9px;
        letter-spacing: 1px;
      }
      
      .header .mode-selector {
        padding: 3px;
        gap: 4px;
      }
      
      .header .mode-btn {
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
      }
      
      .header .mode-btn span {
        display: none; /* Masquer le texte sur mobile */
      }
      
      .header .mode-btn i {
        font-size: 14px;
      }
      
      .burger-btn {
        padding: 8px 12px;
        font-size: 18px;
      }
      
      .burger-menu {
        right: 16px;
        top: 60px;
        width: 220px;
      }
      
      /* Chat container */
      .chat-container {
        margin: 0;
        border-radius: 0;
        height: calc(100vh - 60px - var(--safe-top, 0px) - var(--safe-bottom, 0px));
      }
      
      .chat-messages {
        padding: 16px;
      }
      
      /* Messages */
      .message-user,
      .message-assistant {
        max-width: 90%;
        font-size: 15px;
        padding: 14px 16px;
      }
      
      .message-user {
        margin-left: auto;
      }
      
      .message-assistant {
        margin-right: auto;
      }
      
      /* Input area */
      .input-area {
        padding: 16px 20px;
      }
      
      .input-wrapper {
        flex-direction: column;
        gap: 12px;
      }
      
      #userInput {
        width: 100%;
        font-size: 16px;
        padding: 14px 16px;
        min-height: 80px;
      }
      
      #sendBtn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
      }
      
      /* Welcome screen */
      .welcome {
        padding: 40px 20px;
      }
      
      .welcome h2 {
        font-size: 24px;
      }
      
      .welcome p {
        font-size: 15px;
      }
      
      .examples {
        grid-template-columns: 1fr;
        gap: 12px;
      }
      
      /* Tableaux responsive */
      table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
      }
      
      /* Images responsive */
      .message-assistant img,
      .message-user img,
      img {
        max-width: 100%;
        height: auto;
      }
      
      /* Answer sections */
      .answer-section {
        padding: 16px;
      }
      
      .answer-section h4 {
        font-size: 16px;
      }
      
      .answer-section p,
      .answer-section li {
        font-size: 14px;
      }
    }
    
    /* Extra small devices */
    @media (max-width: 375px) {
      .header {
        padding: 12px 16px;
      }
      
      .brand-name {
        font-size: 18px;
      }
      
      .welcome h2 {
        font-size: 22px;
      }
      
      .message-user,
      .message-assistant {
        font-size: 14px;
        padding: 12px 14px;
      }
    }

    /* ========================================
       ATTACHED FILES STYLES
       ======================================== */
    
    .attached-files {
      padding: 8px 20px;
      background: #f8f9fa;
      border-top: 1px solid #e0e0e0;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    
    .attached-file {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      background: white;
      border: 1px solid #C5A572;
      border-radius: 20px;
      font-size: 13px;
      color: #1A2942;
      max-width: 200px;
    }
    
    .attached-file .file-icon {
      color: #C5A572;
      font-size: 14px;
    }
    
    .attached-file .file-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      flex: 1;
    }
    
    .attached-file .file-remove {
      background: none;
      border: none;
      color: #999;
      cursor: pointer;
      padding: 0;
      font-size: 16px;
      line-height: 1;
      transition: color 0.2s;
    }
    
    .attached-file .file-remove:hover {
      color: #e74c3c;
    }
    
    .attached-file.uploading {
      opacity: 0.6;
      background: #f8f9fa;
    }
    
    .attached-file.uploading .file-name::after {
      content: ' (extraction...)';
      color: #999;
      font-style: italic;
    }
    
    .attached-file.error {
      border-color: #e74c3c;
      background: #fff5f5;
    }
    
    .attached-file.error .file-icon {
      color: #e74c3c;
    }
    
    /* Upload button hover */
    #uploadBtn:hover svg path {
      stroke: #D4B98A;
    }
    
    /* Drag and drop overlay */
    .drag-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(26, 41, 66, 0.9);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      pointer-events: none;
    }
    
    .drag-overlay-content {
      text-align: center;
      color: white;
    }
    
    .drag-overlay-content i {
      font-size: 64px;
      color: #C5A572;
      margin-bottom: 20px;
    }
    
    .drag-overlay-content p {
      font-size: 24px;
      font-weight: 500;
    }
    
    /* Mobile adjustments for attached files */
    @media (max-width: 768px) {
      .attached-files {
        padding: 6px 12px;
      }
      
      .attached-file {
        padding: 4px 10px;
        font-size: 12px;
        max-width: 150px;
      }
    }

    /* ============================================================================
       MODAL PLANS - Affichage quand quota atteint
       ============================================================================ */
    
    .plans-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.8);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      padding: 20px;
      backdrop-filter: blur(4px);
    }
    
    .plans-modal {
      background: white;
      border-radius: 20px;
      max-width: 900px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      position: relative;
      box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    }
    
    .plans-modal-close {
      position: absolute;
      top: 15px;
      right: 20px;
      background: none;
      border: none;
      font-size: 28px;
      color: #666;
      cursor: pointer;
      z-index: 1;
    }
    
    .plans-modal-close:hover {
      color: #333;
    }
    
    .plans-modal-header {
      text-align: center;
      padding: 40px 30px 30px;
      background: linear-gradient(135deg, #1A2942 0%, #2d4a6f 100%);
      color: white;
      border-radius: 20px 20px 0 0;
    }
    
    .plans-modal-icon {
      font-size: 48px;
      margin-bottom: 15px;
    }
    
    .plans-modal-header h2 {
      font-size: 28px;
      margin-bottom: 10px;
    }
    
    .plans-modal-subtitle {
      font-size: 16px;
      opacity: 0.9;
      line-height: 1.5;
    }
    
    .plans-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
      padding: 30px;
    }
    
    .plans-grid-2 {
      grid-template-columns: repeat(2, 1fr);
      max-width: 700px;
      margin: 0 auto;
    }
    
    .plan-card {
      background: #f8f9fa;
      border-radius: 16px;
      padding: 25px;
      text-align: center;
      position: relative;
      border: 2px solid transparent;
      transition: all 0.3s ease;
    }
    
    .plan-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .plan-popular {
      border-color: #C5A572;
      background: white;
    }
    
    .plan-badge {
      position: absolute;
      top: -12px;
      left: 50%;
      transform: translateX(-50%);
      background: #C5A572;
      color: white;
      padding: 4px 16px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
    }
    
    .plan-name {
      font-size: 20px;
      color: #1A2942;
      margin-bottom: 15px;
    }
    
    .plan-price {
      margin-bottom: 10px;
    }
    
    .plan-amount {
      font-size: 42px;
      font-weight: 700;
      color: #1A2942;
    }
    
    .plan-period {
      font-size: 16px;
      color: #666;
    }
    
    .plan-description {
      color: #666;
      margin-bottom: 20px;
      font-size: 14px;
    }
    
    .plan-features {
      list-style: none;
      text-align: left;
      margin-bottom: 25px;
    }
    
    .plan-features li {
      padding: 8px 0;
      color: #444;
      font-size: 14px;
      border-bottom: 1px solid #eee;
    }
    
    .plan-features li:last-child {
      border-bottom: none;
    }
    
    .plan-btn {
      width: 100%;
      padding: 14px;
      border-radius: 10px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      background: #1A2942;
      color: white;
      border: none;
    }
    
    .plan-btn:hover {
      background: #2d4a6f;
    }
    
    .plan-btn-primary {
      background: linear-gradient(135deg, #C5A572 0%, #d4b98a 100%);
      color: #1A2942;
    }
    
    .plan-btn-primary:hover {
      background: linear-gradient(135deg, #d4b98a 0%, #e5c99b 100%);
    }
    
    .plans-modal-footer {
      text-align: center;
      padding: 20px 30px 30px;
      border-top: 1px solid #eee;
    }
    
    .plans-modal-footer p {
      color: #666;
      margin-bottom: 15px;
      font-size: 14px;
    }
    
    .plans-modal-wait {
      background: none;
      border: 1px solid #ccc;
      padding: 10px 25px;
      border-radius: 8px;
      color: #666;
      cursor: pointer;
      font-size: 14px;
      transition: all 0.3s ease;
    }
    
    .plans-modal-wait:hover {
      border-color: #999;
      color: #333;
    }
    
    /* Responsive */
    @media (max-width: 768px) {
      .plans-grid {
        grid-template-columns: 1fr;
        padding: 20px;
      }
      
      .plans-modal-header {
        padding: 30px 20px 20px;
      }
      
      .plans-modal-header h2 {
        font-size: 22px;
      }
      
      .plan-amount {
        font-size: 36px;
      }
    }
