:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #212529;
    --light-text: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --input-padding: 1rem;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 2rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.logo-title i {
    color: var(--primary-color);
    font-size: 1.75rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-color);
}

.subtitle {
    color: var(--light-text);
    font-size: 1.1rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.input-section {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.url-input-container {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.url-input, #text {
    width: 100%;
    padding: var(--input-padding);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
    min-height: 100px;
    resize: vertical;
}

.url-input:focus, #text:focus {
    outline: none;
    border-color: var(--primary-color);
}

#text {
    min-height: 200px;
    font-family: inherit;
    line-height: 1.5;
}

#generate-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: var(--input-padding);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

#generate-btn:hover {
    background-color: var(--primary-hover);
}

#generate-btn i {
    font-size: 1.1rem;
}

.loading {
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(67, 97, 238, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.results {
    background: var(--card-background);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.results h2 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.results-subtitle {
    color: var(--light-text);
    margin-bottom: 1.75rem;
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.linkedin-post {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.linkedin-post h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.linkedin-post p {
    margin-bottom: 1rem;
    line-height: 1.65;
    white-space: pre-line;
}

.linkedin-post ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.linkedin-post li {
    margin-bottom: 0.5rem;
}

.copy-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background-color: var(--primary-hover);
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.actions button {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#copy-all-btn {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

#copy-all-btn:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

#new-generation-btn {
    background-color: var(--primary-color);
    color: white;
}

#new-generation-btn:hover {
    background-color: var(--primary-hover);
}

.hidden {
    display: none !important;
}

/* Animation pour le feedback de copie */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.copy-success {
    animation: pulse 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .url-input-container {
        flex-direction: column;
    }

    #generate-btn {
        width: 100%;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
