:root {
--primary: #0077B6;
--primary-light: #90E0EF;
--primary-dark: #023E8A;
--secondary: #0096C7;
--accent: #48CAE4;
--text-dark: #333333;
--text-light: #FFFFFF;
--background: #F8F9FA;
--background-card: #FFFFFF;
--success: #38B000;
--warning: #FF9F1C;
--error: #D62828;
--border-radius: 8px;
--shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
--transition: all 0.3s ease;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Inter', sans-serif;
background-color: var(--background);
color: var(--text-dark);
line-height: 1.6;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: flex-start;
}

header {
background-color: #FFFFFF;
box-shadow: var(--shadow);
padding: 1rem;
position: relative;
}

.header-container {
max-width: 1200px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
}

.logo-container {
display: flex;
align-items: center;
}

.logo {
height: 40px;
margin-right: 15px;
}

.header-title {
font-size: 1.5rem;
font-weight: 600;
color: var(--text-dark);
}

.user-info {
display: flex;
align-items: center;
}

.user-email {
margin-right: 1rem;
font-size: 0.9rem;
color: var(--text-dark);
}

.logout-btn {
background-color: transparent;
border: 1px solid var(--primary);
color: var(--primary);
padding: 0.3rem 0.8rem;
border-radius: var(--border-radius);
cursor: pointer;
font-size: 0.8rem;
transition: var(--transition);
}

.logout-btn:hover {
background-color: var(--primary);
color: var(--text-light);
}

/* === MAIN MODIFIÉ POUR LAYOUT HORIZONTAL === */
main {
flex: 1;
padding: 2rem 1rem;
max-width: 1400px;
margin: 0 auto;
width: 100%;
display: flex;
gap: 20px;
align-items: flex-start;
justify-content: center;
}

/* === CARD MODIFIÉE POUR FLEXBOX === */
.card {
background-color: var(--background-card);
border-radius: var(--border-radius);
box-shadow: var(--shadow);
padding: 2.5rem;
transition: var(--transition);
flex: 1;
min-width: 600px;
max-width: 900px;
margin: 0;
}

.card-header {
margin-bottom: 2rem;
text-align: center;
}

.card-title {
font-size: 1.8rem;
font-weight: 600;
color: var(--primary-dark);
margin-bottom: 0.5rem;
}

.card-subtitle {
font-size: 1rem;
color: var(--text-dark);
opacity: 0.8;
}

.form-group {
margin-bottom: 1.5rem;
}

label {
display: block;
font-weight: 500;
margin-bottom: 0.5rem;
}

input[type="email"] {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid #DDE2E5;
border-radius: var(--border-radius);
font-family: 'Inter', sans-serif;
font-size: 1rem;
transition: var(--transition);
}

input[type="email"]:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.2);
}

/* === STYLES POUR LA CHECKBOX D'ANONYMISATION === */
.checkbox-container {
display: flex;
align-items: center;
margin: 1rem 0;
padding: 1rem;
background-color: rgba(0, 119, 182, 0.05);
border: 1px solid rgba(0, 119, 182, 0.2);
border-radius: var(--border-radius);
transition: var(--transition);
}

.checkbox-container:hover {
background-color: rgba(0, 119, 182, 0.08);
border-color: rgba(0, 119, 182, 0.3);
}

.checkbox-input {
margin-right: 0.75rem;
width: 18px;
height: 18px;
accent-color: var(--primary);
cursor: pointer;
}

.checkbox-label {
display: flex;
align-items: center;
cursor: pointer;
font-size: 0.95rem;
font-weight: 500;
color: var(--text-dark);
margin: 0;
}

.checkbox-icon {
margin-right: 0.5rem;
font-size: 1.1rem;
}

.checkbox-input:checked + .checkbox-label {
color: var(--primary);
}

.checkbox-input:checked + .checkbox-label .checkbox-icon {
filter: brightness(1.2);
}

/* === BLOC D'OPTIONS D'ANONYMISATION === */
.anonymization-options {
margin-top: 1rem;
padding: 1.5rem;
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: var(--border-radius);
transition: var(--transition);
opacity: 0;
max-height: 0;
overflow: hidden;
padding-top: 0;
padding-bottom: 0;
}

.anonymization-options.visible {
opacity: 1;
max-height: 500px;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}

@keyframes slideDown {
from {
opacity: 0;
max-height: 0;
padding-top: 0;
padding-bottom: 0;
}
to {
opacity: 1;
max-height: 500px;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
}

.custom-words-textarea {
width: 100%;
min-height: 120px;
padding: 0.75rem;
border: 1px solid #ddd;
border-radius: var(--border-radius);
font-family: 'Inter', sans-serif;
font-size: 0.9rem;
line-height: 1.5;
resize: vertical;
transition: var(--transition);
background-color: white;
}

.custom-words-textarea:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.2);
}

.custom-words-textarea::placeholder {
color: #6c757d;
line-height: 1.4;
}

.helper-text {
display: block;
margin-top: 0.5rem;
font-size: 0.85rem;
color: #6c757d;
line-height: 1.4;
}

.helper-text strong {
color: var(--primary);
}

.file-upload-container {
position: relative;
width: 100%;
height: 12rem;
border: 2px dashed #DDE2E5;
border-radius: var(--border-radius);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
transition: var(--transition);
background-color: #F8F9FA;
}

.file-upload-container:hover {
border-color: var(--primary);
background-color: rgba(0, 119, 182, 0.03);
}

.file-upload-container.dragover {
border-color: var(--primary);
background-color: rgba(0, 119, 182, 0.05);
}

.file-icon {
font-size: 2.5rem;
color: var(--primary);
margin-bottom: 0.75rem;
}

.file-upload-text {
font-size: 1rem;
color: var(--text-dark);
text-align: center;
padding: 0 1rem;
}

.file-upload-text span {
color: var(--primary);
font-weight: 500;
}

.file-upload-input {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0;
cursor: pointer;
}

.selected-files {
margin-top: 1rem;
max-height: 200px;
overflow-y: auto;
width: 100%;
}

.file-item {
display: flex;
align-items: center;
padding: 0.5rem;
margin-bottom: 0.5rem;
background-color: #F8F9FA;
border-radius: var(--border-radius);
border: 1px solid #DDE2E5;
}

.file-item-icon {
margin-right: 0.5rem;
color: var(--primary);
}

.file-item-name {
flex: 1;
font-size: 0.9rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.file-item-remove {
background: none;
border: none;
color: var(--error);
cursor: pointer;
font-size: 1rem;
padding: 0.25rem;
}

.btn {
width: 100%;
padding: 0.75rem 1.5rem;
background-color: var(--primary);
color: var(--text-light);
border: none;
border-radius: var(--border-radius);
font-family: 'Inter', sans-serif;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
}

.btn:hover {
background-color: var(--primary-dark);
}

.btn:disabled {
background-color: #DDE2E5;
cursor: not-allowed;
}

.btn-icon {
margin-right: 0.5rem;
}

.status-container {
margin-top: 1.5rem;
text-align: center;
transition: var(--transition);
opacity: 0;
height: 0;
overflow: hidden;
}

.status-container.visible {
opacity: 1;
height: auto;
margin-top: 1.5rem;
}

.status-message {
padding: 1rem;
border-radius: var(--border-radius);
font-weight: 500;
}

.status-message.loading {
background-color: rgba(0, 119, 182, 0.1);
color: var(--primary);
display: flex;
align-items: center;
justify-content: center;
}

.status-message.success {
background-color: rgba(56, 176, 0, 0.1);
color: var(--success);
}

.status-message.error {
background-color: rgba(214, 40, 40, 0.1);
color: var(--error);
}

.loading-spinner {
width: 1.5rem;
height: 1.5rem;
margin-right: 0.5rem;
border: 3px solid rgba(0, 119, 182, 0.1);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 1s linear infinite;
}

@keyframes spin {
to {
transform: rotate(360deg);
}
}

.progress-container {
margin-top: 1rem;
width: 100%;
display: none;
}

.progress-container.visible {
display: block;
}

.progress-bar-outer {
width: 100%;
height: 8px;
background-color: #DDE2E5;
border-radius: 4px;
overflow: hidden;
}

.progress-bar-inner {
height: 100%;
background-color: var(--primary);
width: 0%;
transition: width 0.3s ease;
}

.progress-text {
margin-top: 0.5rem;
font-size: 0.8rem;
text-align: right;
color: var(--text-dark);
}

.optional-section {
margin-top: 1.5rem;
border-top: 1px solid #DDE2E5;
padding-top: 1.5rem;
}

.optional-section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1rem;
}

.optional-section-title {
font-size: 1rem;
color: var(--primary);
font-weight: 500;
}

footer {
background-color: #FFFFFF;
padding: 1rem;
text-align: center;
font-size: 0.8rem;
color: #666;
margin-top: auto;
}

/* === LOGS CONTAINER COMPLÈTEMENT REFAIT === */
.logs-container {
width: 350px;
min-width: 350px;
max-width: 350px;
background: white;
border: 1px solid #e5e7eb;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
padding: 20px;
position: sticky;
top: 20px;
max-height: calc(100vh - 120px);
overflow: hidden;
display: flex;
flex-direction: column;
margin-top: 0;
}

.logs-container h3 {
margin: 0 0 15px 0;
font-size: 16px;
font-weight: 600;
color: var(--text-dark);
display: flex;
align-items: center;
gap: 8px;
padding-bottom: 10px;
border-bottom: 1px solid #e5e7eb;
}

.logs-content {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 12px;
line-height: 1.4;
white-space: normal;
overflow-y: auto;
flex: 1;
background: #f8f9fa;
border-radius: 8px;
padding: 12px;
max-height: 100%;
scroll-behavior: smooth;
}

.log-entry {
margin-bottom: 6px;
padding: 6px 8px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.7);
border-left: 3px solid #e5e7eb;
transition: all 0.2s ease;
word-wrap: break-word;
}

.log-entry.success {
border-left-color: var(--success);
background: rgba(56, 176, 0, 0.1);
color: #065f46;
}

.log-entry.error {
border-left-color: var(--error);
background: rgba(214, 40, 40, 0.1);
color: #991b1b;
}

.log-entry.warning {
border-left-color: var(--warning);
background: rgba(255, 159, 28, 0.1);
color: #92400e;
}

.log-entry.info {
border-left-color: var(--primary);
background: rgba(0, 119, 182, 0.1);
color: var(--primary-dark);
}

/* Scrollbar personnalisée */
.logs-content::-webkit-scrollbar {
width: 6px;
}

.logs-content::-webkit-scrollbar-track {
background: #f1f5f9;
border-radius: 3px;
}

.logs-content::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
}

/* Messages de statut dans les logs */
.logs-content .loading {
text-align: center;
color: #6b7280;
font-style: italic;
padding: 20px;
}

.logs-content .error {
color: var(--error);
font-weight: 500;
text-align: center;
padding: 15px;
}

.logs-content .info {
color: var(--primary);
text-align: center;
padding: 15px;
}

/* Masquer le bouton refresh (plus nécessaire) */
.refresh-button {
display: none;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
.logs-container {
width: 300px;
min-width: 300px;
max-width: 300px;
}

.card {
min-width: 500px;
}
}

@media (max-width: 900px) {
main {
flex-direction: column;
gap: 20px;
}

.card {
min-width: auto;
max-width: 100%;
}

.logs-container {
width: 100%;
min-width: auto;
max-width: 100%;
position: static;
max-height: 300px;
order: 2;
}
}

@media (max-width: 768px) {
.card {
padding: 1.5rem;
}

.card-title {
font-size: 1.5rem;
}

.file-upload-container {
height: 10rem;
}

main {
padding: 10px;
}

.logs-container {
max-height: 250px;
}

.logs-content {
font-size: 11px;
}

.log-entry {
padding: 4px 6px;
margin-bottom: 4px;
}
}