* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background-color: #1e1e2d;
    padding: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.data-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.data-btn {
    background-color: #2d2d45;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.data-btn:hover {
    background-color: #3d3d55;
    transform: translateY(-2px);
}

#autoSaveBtn.active {
    background-color: #10b981;
}

#autoSaveStatus {
    font-weight: bold;
}

.app-footer {
    background-color: #1e1e2d;
    padding: 1rem;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
    color: #8a8a8a;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    flex: 1;
}

h1 {
    color: #60a5fa;
    font-weight: 600;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

h2 {
    color: #60a5fa;
    font-weight: 500;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #3a3a3a;
}

.products-section, .responses-section {
    background-color: #1e1e2d;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.products-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 1rem;
    padding-right: 0.5rem;
    max-height: 60vh;
}

.add-product, .add-response {
    display: flex;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

input, textarea, button {
    padding: 0.75rem 1rem;
    border: 1px solid #383854;
    border-radius: 8px;
    background-color: #2d2d3d;
    color: #e0e0e0;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

input, textarea {
    flex-grow: 1;
    margin-right: 10px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    background-color: #4f46e5;
    color: white;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

button:hover {
    background-color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

button:active {
    transform: translateY(0);
}

#productsList {
    list-style-type: none;
}

#productsList li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background-color: #2d2d3d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
}

#productsList li:hover {
    background-color: #383854;
    transform: translateX(4px);
}

#productsList li.active {
    background-color: #2d2d45;
    color: white;
    border-left: 3px solid #4f46e5;
    font-weight: 500;
}

.responses-list {
    display: grid;
    gap: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.response-card {
    background-color: #2d2d3d;
    border-radius: 10px;
    padding: 1.2rem;
    position: relative;
    border-left: 3px solid #4f46e5;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: grab;
}

.response-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.response-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.response-card.drag-over {
    border: 2px dashed #4f46e5;
    background-color: #2d2d45;
}

.response-card.copy-success {
    animation: pulse 0.5s ease;
    border-left: 3px solid #10b981;
    background-color: #2d3d35;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.shortcut-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #4f46e5;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.response-card:hover .shortcut-badge {
    opacity: 1;
}

.response-text {
    margin-bottom: 1rem;
    white-space: pre-wrap;
    line-height: 1.5;
    color: #e0e0e0;
}

.response-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.move-btn {
    background-color: #2d2d45;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.move-btn:hover {
    background-color: #3d3d55;
    transform: translateY(-2px);
}

.move-btn:disabled {
    background-color: #2d2d3d;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.copy-btn, .delete-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.copy-btn {
    background-color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.copy-btn:hover {
    background-color: #059669;
}

.delete-btn {
    background-color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.delete-btn:hover {
    background-color: #dc2626;
}

.copied-message {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(-10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.copied-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Notification globale */
.global-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    text-align: center;
    max-width: 80%;
}

.global-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.global-notification.success {
    background-color: #10b981;
}

.global-notification.error {
    background-color: #ef4444;
}

.global-notification.info {
    background-color: #4f46e5;
}

/* Boîte de dialogue de sélection de fichier */
.file-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.file-dialog-content {
    background-color: #1e1e2d;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.file-dialog h2 {
    margin-bottom: 1rem;
    color: #60a5fa;
}

.file-dialog p {
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

.file-dialog-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-dialog button {
    padding: 1rem;
    font-size: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.file-dialog button:first-child {
    background-color: #4f46e5;
}

.file-dialog button:last-child {
    background-color: #2d2d45;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e1e2d;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4338ca;
}
