:root {
    --primary-color: #fd9b0c;
    --secondary-color: #2b3873;
    --background-color: #f5f5f5;
    --text-color: #333;
    --spacing: 20px;
    --success-color: #28a745;
    --pending-color: #ffc107;
    --active-color: #007bff;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing);
}

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

.logo {
    max-width: 200px;
    margin-bottom: 1rem;
}

h1 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing);
}

.form-group {
    margin-bottom: var(--spacing);
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-weight: bold;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
    display: block;
    margin: 0 auto;
    min-width: 200px;
}

.primary-btn:hover {
    background-color: #e88a00;
}

/* Styles pour la section de chargement */
.loading-section {
    margin: 2rem 0;
}

.loading-steps {
    max-width: 100%;
    margin: 0;
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.step {
    flex: 1;
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    max-width: 300px;
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ddd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    transition: background-color 0.3s;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.step-status {
    margin: 0.5rem 0 0;
    color: #666;
}

/* États des étapes */
.step[data-status="pending"] .step-icon {
    background-color: var(--pending-color);
}

.step[data-status="active"] {
    border: 2px solid var(--active-color);
}

.step[data-status="active"] .step-icon {
    background-color: var(--active-color);
}

.step[data-status="complete"] .step-icon {
    background-color: var(--success-color);
}

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

.step[data-status="active"] {
    animation: pulse 1.5s infinite;
}

.results-section {
    margin-top: 2rem;
}

.result-group {
    margin-bottom: 2rem;
}

.result-group h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.content-box {
    background: white;
    padding: var(--spacing);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-box p {
    margin-bottom: 8px;
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: var(--spacing);
    border-top: 1px solid #ddd;
    color: var(--secondary-color);
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.keyword-bubble {
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-block;
}

.char-count {
    color: #666;
    font-size: 0.9em;
    margin-left: 8px;
}

.item-container {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    margin: 4px 0;
}

.item-container:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Styles pour les actions des items */
.item-actions {
    display: flex;
    gap: 8px;
    position: absolute;
    right: 10px;
}

.preview-btn, .copy-btn {
    opacity: 0;
    padding: 6px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.item-container:hover .preview-btn,
.item-container:hover .copy-btn {
    opacity: 1;
}

.preview-btn:hover,
.copy-btn:hover {
    background-color: #e0e0e0;
}

/* Ajuster l'espacement pour le texte */
.item-container .clickable-text {
    margin: 0;
    padding-right: 200px; /* Espace pour les boutons */
    flex: 1;
    user-select: none; /* Empêcher la sélection du texte au clic */
}

/* Modal de prévisualisation */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Prévisualisation de l'annonce */
.ad-preview {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ad-url {
    color: #202124;
    font-size: 14px;
    margin-bottom: 4px;
}

.ad-badge {
    background-color: #fff;
    color: #1a73e8;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid #1a73e8;
    font-size: 12px;
    margin-right: 8px;
}

.ad-domain {
    color: #202124;
}

.ad-title {
    color: #1a0dab;
    font-size: 20px;
    margin: 4px 0;
    cursor: pointer;
}

.ad-title:hover {
    text-decoration: underline;
}

.ad-description {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.4;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.preview-controls button {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
    white-space: nowrap;
}

.preview-controls .refresh-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.preview-controls .refresh-btn:hover {
    background-color: #e88a00;
}

.ad-info {
    color: #666;
    font-size: 12px;
    margin-top: 8px;
    text-align: right;
    font-style: italic;
}

/* En-tête de section avec bouton de régénération */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    margin: 0;
    flex-shrink: 0;
}

.regenerate-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.regenerate-btn:hover {
    background-color: #1f2a5c;
}

.regenerate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Animation de régénération */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.regenerate-btn:disabled::before {
    content: '🔄';
    display: inline-block;
    animation: spin 1s linear infinite;
}

.clickable-text {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 4px;
}

.clickable-text:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.section-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.export-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background-color: #e88a00;
}

.keywords-section {
    margin-bottom: 20px;
}

.keywords-section h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.keyword-bubble.brand {
    background-color: var(--secondary-color);
    font-weight: bold;
}

/* Style pour le champ d'informations complémentaires */
#additional-info {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 20px;
}

#additional-info:focus {
    outline: none;
    border-color: var(--primary-color);
} 