.main-area {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.main-area h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.main-area p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: justify;
}

/* Élément flottant avec glassmorphisme */
.shortcuts-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(1, 3, 50, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 111, 255, 0.913);
    box-shadow: 0 8px 32px rgba(40, 112, 255, 0.6);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.shortcuts-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.shortcuts-trigger:active {
    transform: scale(0.95);
}

.shortcuts-trigger i {
    font-size: 1.5rem;
    color: #3498db;
}

/* Overlay */
.shortcuts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(19, 47, 75, 0.5), rgba(0, 6, 21, 0.5));
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shortcuts-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal avec glassmorphisme */
.shortcuts-modal {
    background: rgba(255, 255, 255, 0.881);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(66, 165, 245, 0.4);
}

.shortcuts-overlay.active .shortcuts-modal {
    transform: scale(1) translateY(0);
}

/* Partie supérieure */
.shortcuts-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.shortcuts-top h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.336);
    font-weight: 600;
}

.close-control {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #d81e1e;
    text-shadow: 0 2px 6px rgba(255, 46, 46, 0.185);
    box-shadow: 0 2px 6px rgba(255, 46, 46, 0.185);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    border: 1px solid #b3080833;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    margin-left: auto;
}

.close-control:hover {
    background: rgba(220, 38, 38, 0.174);
    color: #d10000;
    transform: scale(1.2);
}

/* Grille des raccourcis */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.35rem 1rem;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Remove initial hidden state since we'll handle it with JS */
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.4);
}

.shortcut-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.shortcut-item:active {
    transform: translateY(0);
}

.shortcut-item i {
    font-size: 1.5rem;
    color: #3498db;
    text-shadow: 0 4px 12px rgba(66, 165, 245, 0.4);
}

.shortcut-item span {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
}

/* Chat IA Styles */
.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-overlay.active {
    opacity: 1;
    visibility: visible;
}

.chat-modal {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    height: 80vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mode PC - Interface plus large */
@media (min-width: 769px) {
    .chat-modal {
        max-width: 90vw;
        width: 90vw;
        margin: 0 5vw;
    }
}

/* Mode mobile - Garder la largeur actuelle */
@media (max-width: 768px) {
    .chat-modal {
        max-width: 600px;
        width: 90%;
    }
}

.chat-overlay.active .chat-modal {
    transform: scale(1) translateY(0);
}

.chat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.chat-top h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
    flex-shrink: 0;
}

.chat-top-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.control-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #7f8c8d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: auto;
}

.control-item:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #2c3e50;
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scrollbar-width: none;
}

.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scrollbar-width: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* ===== NOUVEAU DESIGN MODERNE DES MESSAGES ===== */
.message-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 85%;
    margin-bottom: 8px;
    animation: slideInMessage 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-container.ai {
    align-self: flex-start;
    flex-direction: row;
}

.message-container.user {
    align-self: flex-end;
    flex-direction: row;
}

/* ===== AVATARS EXTERNES ===== */
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.message-container.ai .message-avatar {
    background: linear-gradient(135deg, #174392 0%, #3b82f6 100%);
    color: white;
}

.message-container.user .message-avatar {
    background: linear-gradient(135deg, #FFCC00 0%, #fb923c 100%);
    color: #174392;
}

.message-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.message-avatar:hover::before {
    transform: translateX(100%);
}

.message-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ===== BULLES DE MESSAGES ===== */
.message-bubble-container {
    position: relative;
    flex: 1;
    max-width: calc(100% - 52px);
}

.message-bubble {
    padding: 16px 20px;
    border-radius: 20px;
    word-wrap: break-word;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.message-bubble.ai {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    color: #1a202c;
    border-bottom-left-radius: 8px;
    margin-left: 8px;
}

.message-bubble.user {
    background: linear-gradient(135deg, #174392 0%, #3b82f6 100%);
    color: white;
    border-bottom-right-radius: 8px;
    margin-right: 8px;
}

.message-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.message-bubble.ai:hover {
    box-shadow: 0 8px 30px rgba(23, 67, 146, 0.2);
}

.message-bubble.user:hover {
    box-shadow: 0 8px 30px rgba(255, 204, 0, 0.3);
}

/* ===== EN-TÊTES ET SÉPARATEURS ===== */
.message-header {
    margin-bottom: 8px;
}

.message-name {
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

.message-bubble.ai .message-name {
    color: #174392;
}

.message-bubble.user .message-name {
    color: rgba(255, 255, 255, 0.9);
}

.message-separator {
    height: 1px;
    margin: 8px 0 12px 0;
    position: relative;
    overflow: hidden;
}

.message-bubble.ai .message-separator {
    background: linear-gradient(90deg, transparent, #174392, transparent);
}

.message-bubble.user .message-separator {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.message-separator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmerSeparator 2s infinite;
}

/* ===== CONTENU DES MESSAGES ===== */
.message-content {
    line-height: 1.6;
    font-size: 0.95em;
}

.message-bubble.ai .message-content {
    color: #2d3748;
}

.message-bubble.user .message-content {
    color: white;
}

.message-bubble.ai.typing {
    font-style: italic;
}

.message-bubble.ai.typing .message-content {
    opacity: 0.8;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInMessage {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmerSeparator {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.chat-input-container {
    display: flex;
    gap: 12px;
    padding: 1.5rem 2rem;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(248, 250, 252, 0.4) 100%);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.chat-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
}

#chatInput {
    flex: 1;
    min-width: 0;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    outline: none;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    color: #2d3748;
}

#chatInput::placeholder {
    color: #a0aec0;
    transition: all 0.3s ease;
}

#chatInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 8px 30px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

#chatInput:focus::placeholder {
    color: #cbd5e0;
    transform: translateY(-2px);
}

#sendBtn {
    padding: 16px 20px;
    background: linear-gradient(135deg, #174392 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 60px;
    font-size: 1.1em;
    box-shadow: 0 4px 20px rgba(23, 67, 146, 0.3);
    position: relative;
    overflow: hidden;
}

#sendBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#sendBtn:hover {
    background: linear-gradient(135deg, #FFCC00 0%, #fb923c 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 204, 0, 0.4);
}

#sendBtn:hover::before {
    left: 100%;
}

#sendBtn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(23, 67, 146, 0.3);
}

#sendBtn:disabled {
    background: linear-gradient(135deg, #a0aec0 0%, #cbd5e0 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Help Styles */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-overlay.active {
    opacity: 1;
    visibility: visible;
}

.help-modal {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: none;
}

.help-overlay.active .help-modal {
    transform: scale(1) translateY(0);
}

.help-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.help-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.help-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.help-search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.help-search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    padding-right: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    outline: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.help-search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.help-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    pointer-events: none;
}

.help-questions-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-question-item {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2c3e50;
    border-left: 3px solid transparent;
}

.help-question-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border-left-color: #3498db;
    transform: translateX(2px);
}

.help-category h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.help-category ul {
    list-style: none;
    padding: 0;
}

.help-category li {
    padding: 0.5rem 0;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    padding-left: 0.8rem;
}

.help-category li:hover {
    color: #3498db;
    border-left-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivité */
@media (max-width: 768px) {
    .shortcuts-modal {
        padding: 1.5rem;
        width: 95%;
        margin: 1rem;
    }
    
    .shortcuts-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.8rem;
    }
    
    .shortcut-item {
        padding: 1rem 0.5rem;
        min-width: 0;
    }
    
    .shortcut-item i {
        font-size: 1.2rem;
    }
    
    .shortcut-item span {
        font-size: 0.8rem;
        word-break: break-word;
    }
    
    .shortcuts-trigger {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .shortcuts-trigger i {
        font-size: 1.2rem;
    }
    
    .chat-modal {
        height: 85vh;
        max-height: 85vh;
        width: 95%;
        margin: 1rem;
        position: relative;
    }
    
    .chat-top {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .chat-top h2 {
        text-align: center;
        font-size: 1.5rem;
    }
    
    .chat-top-controls {
        justify-content: center;
    }
    
    .chat-messages {
        padding: 1rem 1.5rem;
    }
    
    .message {
        max-width: 90%;
        word-break: break-word;
    }
    
    .chat-input-container {
        padding: 1rem 1.5rem;
        gap: 0.8rem;
    }
    
    #chatInput {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    #sendBtn {
        padding: 0.8rem;
        min-width: 44px;
    }
    
    .help-modal {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .help-top {
        flex-direction: row;
        align-items: stretch;
        gap: 1rem;
    }
    
    .help-top h2 {
        text-align: center;
        font-size: 1.5rem;
    }
    
    .help-category li {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .help-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .help-question-item {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .shortcuts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .shortcut-item {
        padding: 0.8rem 0.3rem;
    }
    
    .shortcut-item i {
        font-size: 1rem;
    }
    
    .shortcut-item span {
        font-size: 0.7rem;
    }
    
    .shortcuts-modal {
        width: 98%;
        padding: 1rem;
    }
    
    .chat-modal {
        width: 98%;
        height: 95vh;
    }
    
    .chat-top {
        padding: 0.8rem 1rem;
    }
    
    .chat-messages {
        padding: 0.8rem 1rem;
    }
    
    .chat-input-container {
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }
    
    #chatInput {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }
    
    #sendBtn {
        width: auto;
        min-width: 44px;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .help-modal {
        width: 98%;
        padding: 1rem;
    }
    
    .help-top {
        padding: 0.8rem 0;
    }
    
    .control-item, .close-control {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    #clearHistoryBtn{
        margin-right: 0px;
    }

    #typewriterToggleBtn {
        margin-right: 0px;
    }
}

/* Fix for mobile keyboard overlay */
@media (max-width: 768px) {
    .chat-overlay.active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .chat-modal {
        height: 85vh;
        height: 85dvh; /* Dynamic viewport height */
        max-height: 85vh;
        max-height: 85dvh;
    }
    
    .chat-input-container {
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        z-index: 10;
    }
}

@media (max-width: 480px) {
    .chat-modal {
        height: 90vh;
        height: 90dvh;
        max-height: 90vh;
        max-height: 90dvh;
    }
}

/* Ensure input is always visible above keyboard */
@supports (height: 100dvh) {
    @media (max-width: 768px) {
        .chat-overlay {
            height: 100dvh;
        }
        
        .chat-modal {
            height: 85dvh;
            max-height: 85dvh;
        }
    }
    
    @media (max-width: 480px) {
        .chat-modal {
            height: 90dvh;
            max-height: 90dvh;
        }
    }
}

/* ===== LOADER INFINI MODERNE ===== */
.loading-message {
    background: linear-gradient(135deg, #174392 0%, #3b82f6 100%) !important;
    border-radius: 20px !important;
    padding: 20px !important;
    margin: 12px 0 !important;
    max-width: 80px !important;
    height: 60px !important;
    animation: slideInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(23, 67, 146, 0.3) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: flex-start !important;
}

.loading-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

.infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.loader-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.loader-dots span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: simple-pulse 1.2s ease-in-out infinite;
}

.loader-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.3s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.6s;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes simple-pulse {
    0%, 80%, 100% { 
        opacity: 0.3; 
        transform: scale(0.9);
    }
    40% { 
        opacity: 1; 
        transform: scale(1.1);
    }
}

/* ===== ÉTAT D'ATTENTE LONGUE (10s) ===== */
.loading-message.long-wait {
    max-width: 280px !important;
    min-width: 220px !important;
    height: auto !important;
    padding: 16px 18px !important;
}

.loading-message.long-wait .infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.loading-message.long-wait .loader-text {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.2px;
    text-align: center;
    line-height: 1.25;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.18);
    animation: textPulse 1.6s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.75;
        transform: scale(0.98);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== FORMATAGE DE TEXTE ===== */

/* Texte en gras */
.message strong {
    font-weight: 700;
    color: inherit;
}

/* Texte en italique */
.message em {
    font-style: italic;
    color: inherit;
}

/* Texte highlight avec fond grisé et blur */
.highlight-text {
    background: rgba(128, 128, 128, 0.2);
    backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    display: inline-block;
    margin: 2px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.highlight-text:hover {
    background: rgba(128, 128, 128, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Formatage dans le champ de saisie */
#chatInput strong {
    font-weight: 700;
    color: #2c3e50;
}

#chatInput em {
    font-style: italic;
    color: #34495e;
}

#chatInput .highlight-text {
    background: rgba(52, 152, 219, 0.2);
    color: #2c3e50;
    border-color: rgba(52, 152, 219, 0.4);
}

/* ===== STYLES POUR LES EN-TÊTES DE MESSAGES ===== */
.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.85em;
    font-weight: 600;
    opacity: 0.8;
}

.message-header i {
    font-size: 1.1em;
    width: 16px;
    text-align: center;
}

.message.ai .message-header {
    color: #3498db;
}

.message.ai .message-header i {
    color: #e74c3c;
}

.message.user .message-header {
    color: #27ae60;
}

.message.user .message-header i {
    color: #f39c12;
}

.message-name {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.message-content {
    line-height: 1.6;
}

/* ===== STYLES POUR LES BOUTONS DE COPIE ===== */
.copy-button {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8em;
    color: #666;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    flex-shrink: 0;
}

/* Positionnement pour les messages AI (dans le bubble container) */
.message-container.ai .copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* Positionnement pour les messages utilisateur (élément externe à gauche) */
.message-container.user .copy-button {
    position: static;
    background: rgba(255, 204, 0, 0.9);
    color: #174392;
    border: 1px solid rgba(255, 204, 0, 0.3);
    margin-right: 3px;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 1);
    color: #174392;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(23, 67, 146, 0.3);
}

.message-container.user .copy-button:hover {
    background: rgba(255, 204, 0, 1);
    color: #174392;
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
}

.copy-button.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.message-container {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-container:hover .copy-button {
    opacity: 0.7;
    visibility: visible;
    transform: scale(0.9);
}

/* ===== FEEDBACK DE COPIE ===== */
.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.copy-feedback.show {
    opacity: 1;
    transform: translateX(0);
}

.copy-feedback i {
    margin-right: 8px;
}

/* Disabled input styles during loading */
.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #ccc;
}
/* Liens inline dans le contenu des messages */
.message-content .ai-inline-link {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px dashed rgba(52, 152, 219, 0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.message-content .ai-inline-link:hover,
.message-content .ai-inline-link:focus {
  color: #2c80b7;
  text-decoration: underline;
  border-bottom-color: rgba(44, 128, 183, 0.5);
}

/* Contraste pour bulles AI (fond clair) */
.message-bubble.ai .ai-inline-link {
  color: #1f6fa6;
}

.main-area {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.main-area h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.main-area p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: justify;
}

/* Élément flottant avec glassmorphisme */
.shortcuts-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(1, 3, 50, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 111, 255, 0.913);
    box-shadow: 0 8px 32px rgba(40, 112, 255, 0.6);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.shortcuts-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.shortcuts-trigger:active {
    transform: scale(0.95);
}

.shortcuts-trigger i {
    font-size: 1.5rem;
    color: #3498db;
}

/* Overlay */
.shortcuts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(19, 47, 75, 0.5), rgba(0, 6, 21, 0.5));
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shortcuts-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal avec glassmorphisme */
.shortcuts-modal {
    background: rgba(255, 255, 255, 0.881);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(66, 165, 245, 0.4);
}

.shortcuts-overlay.active .shortcuts-modal {
    transform: scale(1) translateY(0);
}

/* Partie supérieure */
.shortcuts-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.shortcuts-top h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.336);
    font-weight: 600;
}

.close-control {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #d81e1e;
    text-shadow: 0 2px 6px rgba(255, 46, 46, 0.185);
    box-shadow: 0 2px 6px rgba(255, 46, 46, 0.185);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    border: 1px solid #b3080833;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    margin-left: auto;
}

.close-control:hover {
    background: rgba(220, 38, 38, 0.174);
    color: #d10000;
    transform: scale(1.2);
}

/* Grille des raccourcis */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.35rem 1rem;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Remove initial hidden state since we'll handle it with JS */
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.4);
}

.shortcut-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.shortcut-item:active {
    transform: translateY(0);
}

.shortcut-item i {
    font-size: 1.5rem;
    color: #3498db;
    text-shadow: 0 4px 12px rgba(66, 165, 245, 0.4);
}

.shortcut-item span {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
}

/* Chat IA Styles */
.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-overlay.active {
    opacity: 1;
    visibility: visible;
}

.chat-modal {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    height: 80vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mode PC - Interface plus large */
@media (min-width: 769px) {
    .chat-modal {
        max-width: 90vw;
        width: 90vw;
        margin: 0 5vw;
    }
}

.chat-overlay.active .chat-modal {
    transform: scale(1) translateY(0);
}

.chat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.chat-top h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
    flex-shrink: 0;
}

.chat-top-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.control-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #7f8c8d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: auto;
}

.control-item:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #2c3e50;
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scrollbar-width: none;
}

.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scrollbar-width: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* ===== NOUVEAU DESIGN MODERNE DES MESSAGES ===== */
.message-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 85%;
    margin-bottom: 8px;
    animation: slideInMessage 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-container.ai {
    align-self: flex-start;
    flex-direction: row;
}

.message-container.user {
    align-self: flex-end;
    flex-direction: row;
}

/* ===== AVATARS EXTERNES ===== */
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.message-container.ai .message-avatar {
    background: linear-gradient(135deg, #174392 0%, #3b82f6 100%);
    color: white;
}

.message-container.user .message-avatar {
    background: linear-gradient(135deg, #FFCC00 0%, #fb923c 100%);
    color: #174392;
}

.message-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.message-avatar:hover::before {
    transform: translateX(100%);
}

.message-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ===== BULLES DE MESSAGES ===== */
.message-bubble-container {
    position: relative;
    flex: 1;
    max-width: calc(100% - 52px);
}

.message-bubble {
    padding: 16px 20px;
    border-radius: 20px;
    word-wrap: break-word;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.message-bubble.ai {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    color: #1a202c;
    border-bottom-left-radius: 8px;
    margin-left: 8px;
}

.message-bubble.user {
    background: linear-gradient(135deg, #174392 0%, #3b82f6 100%);
    color: white;
    border-bottom-right-radius: 8px;
    margin-right: 8px;
}

.message-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.message-bubble.ai:hover {
    box-shadow: 0 8px 30px rgba(23, 67, 146, 0.2);
}

.message-bubble.user:hover {
    box-shadow: 0 8px 30px rgba(255, 204, 0, 0.3);
}

/* ===== EN-TÊTES ET SÉPARATEURS ===== */
.message-header {
    margin-bottom: 8px;
}

.message-name {
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

.message-bubble.ai .message-name {
    color: #174392;
}

.message-bubble.user .message-name {
    color: rgba(255, 255, 255, 0.9);
}

.message-separator {
    height: 1px;
    margin: 8px 0 12px 0;
    position: relative;
    overflow: hidden;
}

.message-bubble.ai .message-separator {
    background: linear-gradient(90deg, transparent, #174392, transparent);
}

.message-bubble.user .message-separator {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.message-separator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmerSeparator 2s infinite;
}

/* ===== CONTENU DES MESSAGES ===== */
.message-content {
    line-height: 1.6;
    font-size: 0.95em;
}

/* Mode mobile - Garder la largeur actuelle */
@media (max-width: 768px) {
    .chat-modal {
        max-width: 600px;
        width: 90%;
    }
    .chat-messages {
        padding: 3px;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        scroll-behavior: smooth;
    }
    .message-bubble.ai {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
        color: #1a202c;
        border-bottom-left-radius: 8px;
        margin-left: 3px;
    }
    .message-bubble.user {
        background: linear-gradient(135deg, #174392 0%, #3b82f6 100%);
        color: white;
        border-bottom-right-radius: 8px;
        margin-right: 3px;
    }
    .message-avatar {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .7rem;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
}

/* Overrides – moderniser l’apparence des cards des raccourcis */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.2rem;
}

.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.1rem;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    /* Conservation de l’état initial pour l’animation d’entrée (géré par JS) */
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
    min-height: 120px;
}

.shortcut-item:hover {
    transform: translateY(-3px);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
    border-color: rgba(66, 165, 245, 0.35);
}

.shortcut-item:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.10);
}

.shortcut-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.35), 0 6px 18px rgba(17, 24, 39, 0.08);
}

.shortcut-item i {
    font-size: 1.8rem;
    color: #174392;
    text-shadow: none;
}

.shortcut-item span {
    font-size: 0.95rem;
    color: #174392;
    font-weight: 600;
    text-align: center;
}

/* Overrides – en-tête et bouton de fermeture des raccourcis */
.shortcuts-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px 18px;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.shortcuts-top h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #174392;
    text-align: center;
    letter-spacing: 0.3px;
}

.shortcuts-top h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #174392, #42a5f5);
    margin: 8px auto 0;
    opacity: 0.85;
}

.close-control {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(23, 67, 146, 0.08);
    color: #174392;
    border: 1px solid rgba(23, 67, 146, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.close-control:hover {
    background: rgba(23, 67, 146, 0.12);
    border-color: rgba(23, 67, 146, 0.28);
    transform: scale(1.06);
}

.close-control:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.35);
}

/* Overrides – grille à 3 colonnes desktop, 2 colonnes mobile */
@media (min-width: 992px) {
    .shortcuts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .shortcuts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .shortcuts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    .shortcut-item {
        min-height: 100px;
        padding: 0.95rem;
    }
}

/* IA Help – aligner le style et supprimer le X */
.help-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px 18px;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.help-top h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #174392;
    text-align: center;
    letter-spacing: 0.3px;
}

.help-top h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #174392, #42a5f5);
    margin: 8px auto 0;
    opacity: 0.85;
}

/* Masquer le bouton X dans l’aide (il existe déjà Retour) */
.help-top .close-control {
    display: none !important;
}

/* Styliser et repositionner le bouton Retour pour cohérence (centré verticalement) */
.help-top .control-item#reopenChatBtn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(23, 67, 146, 0.08);
    color: #174392;
    border: 1px solid rgba(23, 67, 146, 0.18);
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.help-top .control-item#reopenChatBtn:hover {
    background: rgba(23, 67, 146, 0.12);
    border-color: rgba(23, 67, 146, 0.28);
    transform: translateY(-50%) scale(1.03);
}

.help-top .control-item#reopenChatBtn span {
    font-size: 0.85rem;
    color: #174392;
    margin-right: 4px;
}
