:root {
    --primary-color: #ffb700;
    --primary-dark: #e6a500;
    --text-color: #1c1e21;
    --bg-color: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 40% 20%, rgba(255, 183, 0, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(59, 89, 152, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(255, 183, 0, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.logo {
    display: block;
    margin: 0 auto 30px;
    max-width: 180px;
    height: auto;
    transition: transform var(--transition-normal);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    text-align: center;
    color: var(--text-color);
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card::before {
    display: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.upload-section {
    text-align: center;
}

.file-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 14px 28px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.file-label::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.file-label:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 183, 0, 0.3);
}

.file-label:hover::after {
    opacity: 1;
}

.file-label:active {
    transform: translateY(0);
}

.file-label i {
    margin-right: 10px;
}

.hidden {
    display: none;
}

.file-info {
    margin-top: 25px;
    text-align: left;
    background: rgba(240, 242, 245, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--primary-color);
}

.file-info p {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.file-info p:last-child {
    margin-bottom: 0;
}

button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 14px 28px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 183, 0, 0.3);
}

button:hover::after {
    opacity: 1;
}

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

button:disabled {
    background-color: #e0e0e0;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button:disabled::after {
    display: none;
}

.progress-container {
    text-align: center;
}

.progress-text {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.progress-bar-container {
    background: rgba(240, 242, 245, 0.5);
    border-radius: 100px;
    height: 12px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), #ffc740);
    height: 100%;
    border-radius: 100px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
    transform: translateX(-100%);
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.results-container h2 {
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: -0.3px;
    position: relative;
    display: inline-block;
}

.results-container h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 25px;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

th, td {
    padding: 18px 15px;
    text-align: center;
}

th {
    background-color: rgba(240, 242, 245, 0.7);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
}

.title {
    background: linear-gradient(90deg, var(--primary-color), #ffc740);
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.3rem;
    padding: 20px;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}

.clickable-cell {
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-color);
}

.clickable-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.clickable-cell:hover {
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 0 20px rgba(255, 183, 0, 0.2);
}

.clickable-cell:hover::before {
    opacity: 0.1;
}

.clickable-cell:active {
    transform: scale(1);
}

.clickable-cell::after {
    content: "Cliquer pour copier";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.clickable-cell:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.footer {
    margin-top: 40px;
    text-align: center;
    color: rgba(28, 30, 33, 0.7);
    font-size: 0.9rem;
}

/* Classes pour les différents niveaux de progression */
.progress-0 { width: 0%; }
.progress-10 { width: 10%; }
.progress-20 { width: 20%; }
.progress-30 { width: 30%; }
.progress-40 { width: 40%; }
.progress-50 { width: 50%; }
.progress-60 { width: 60%; }
.progress-70 { width: 70%; }
.progress-80 { width: 80%; }
.progress-90 { width: 90%; }
.progress-100 { width: 100%; }

/* Styles pour le panneau de paramètres */
.settings-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.settings-button:hover {
    background-color: var(--primary-color);
    transform: rotate(30deg);
}

.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    z-index: 1000;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-panel.open {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.close-settings {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(240, 242, 245, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: all var(--transition-normal);
    padding: 0;
}

.close-settings:hover {
    background-color: #e0e0e0;
    transform: rotate(90deg);
}

.settings-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-color);
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

.settings-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.settings-section {
    margin-bottom: 25px;
    padding: 25px;
    border-radius: var(--border-radius-md);
    background: rgba(240, 242, 245, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.settings-section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.settings-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

.settings-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.9);
}

.settings-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 183, 0, 0.2);
    outline: none;
}

.keyword-list {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.keyword-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color var(--transition-fast);
    border-radius: var(--border-radius-sm);
}

.keyword-item:hover {
    background-color: rgba(240, 242, 245, 0.8);
}

.keyword-item:last-child {
    border-bottom: none;
}

.remove-keyword {
    background-color: rgba(255, 107, 107, 0.9);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.remove-keyword:hover {
    background-color: #ff4757;
    transform: scale(1.1);
}

.add-keyword-container {
    display: flex;
    margin-top: 15px;
}

.add-keyword-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.9);
}

.add-keyword-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 183, 0, 0.2);
    outline: none;
}

.add-keyword-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.add-keyword-button:hover {
    background-color: var(--primary-dark);
}

.save-settings {
    background: linear-gradient(90deg, var(--primary-color), #ffc740);
    color: var(--text-color);
    border: none;
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    width: 100%;
    margin-top: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.save-settings::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.save-settings:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 183, 0, 0.3);
}

.save-settings:hover::after {
    opacity: 1;
}

.save-settings:active {
    transform: translateY(0);
}

.remove-stand {
    background-color: rgba(255, 107, 107, 0.9) !important;
    color: white !important;
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 12px !important;
    font-size: 0.9rem;
    border-radius: var(--border-radius-sm) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.remove-stand:hover {
    background-color: #ff4757 !important;
    transform: translateY(-2px) !important;
}

.remove-stand i {
    margin-right: 5px;
}

#addStandButton {
    background: linear-gradient(90deg, #4CAF50, #43a047);
    color: white;
    margin-bottom: 25px;
    width: 100%;
    padding: 14px;
    font-weight: 600;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

#addStandButton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

#addStandButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

#addStandButton:hover::after {
    opacity: 1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.overlay.open {
    display: block;
    opacity: 1;
}

/* Système de notifications toast */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease;
    border-left: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success,
.toast.error,
.toast.warning,
.toast.info {
    border-left: none;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 1.5rem;
    min-width: 24px;
}

.toast-icon.success {
    color: #4CAF50;
}

.toast-icon.error {
    color: #ff4757;
}

.toast-icon.warning {
    color: #ff9800;
}

.toast-icon.info {
    color: #2196F3;
}

.toast-message {
    font-size: 1rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    margin-left: 10px;
    transition: color 0.2s;
    box-shadow: none;
}

.toast-close:hover {
    color: #333;
    background: none;
    transform: none;
}

@keyframes toast-progress {
    0% { width: 100%; }
    100% { width: 0%; }
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
    overflow: hidden;
}

.toast-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: var(--primary-color);
    animation: toast-progress 5s linear forwards;
}

.toast.success .toast-progress::after {
    background: #4CAF50;
}

.toast.error .toast-progress::after {
    background: #ff4757;
}

.toast.warning .toast-progress::after {
    background: #ff9800;
}

.toast.info .toast-progress::after {
    background: #2196F3;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .settings-panel {
        width: 95%;
        padding: 20px;
    }
    
    th, td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
    
    .title {
        font-size: 1.1rem;
    }
    
    .settings-button {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .clickable-cell {
        font-size: 1rem;
    }
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Accessibility improvements */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}