/* Thème sombre commun pour toutes les pages */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    background-color: #121212;
    color: #e0e0e0;
}

h1, h2, h3 {
    color: #90caf9;
    text-align: center;
}

.container {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Bouton de retour à l'accueil */
.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #303030;
    color: #90caf9;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.home-button:hover {
    background-color: #404040;
    transform: scale(1.1);
}

/* Language Button */
.language-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #303030;
    color: #90caf9;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-button:hover {
    background-color: #404040;
    transform: scale(1.1);
}

/* Zone de téléchargement */
.upload-area {
    border: 2px dashed #555;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: border-color 0.3s;
    background-color: #252525;
}

.upload-area:hover {
    border-color: #90caf9;
    background-color: #303030;
}

.file-info {
    background-color: #303030;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #e0e0e0;
}

/* Boutons */
button {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #5c9aff;
}

button:disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
}

/* Messages toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

/* Status et résultats */
.status {
    margin: 20px 0;
    padding: 10px;
    background-color: #303030;
    border-radius: 4px;
}

.preview-container {
    margin-top: 20px;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    background-color: #252525;
}

/* Options et formulaires */
.options {
    margin: 20px 0;
    padding: 10px;
    background-color: #252525;
    border-radius: 4px;
}

.option {
    margin-bottom: 10px;
}

.option label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, select, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #303030;
    color: #e0e0e0;
    margin-bottom: 10px;
}

/* Prévisualisations */
.preview {
    width: 100%;
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #444;
    padding: 10px;
    margin-bottom: 20px;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Spinner de chargement */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* Styles spécifiques pour les PDF */
.pdf-thumbnail {
    background-color: #252525;
    border: 1px solid #444;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.pdf-page {
    background-color: #252525;
    border: 1px solid #444;
    margin: 5px;
    padding: 5px;
    display: inline-block;
}

/* Styles pour les listes */
ul, ol {
    background-color: #252525;
    border-radius: 4px;
    padding: 15px 15px 15px 35px;
}

li {
    margin-bottom: 8px;
}

/* Liens */
a {
    color: #90caf9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #bbdefb;
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #252525;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #444;
}

th {
    background-color: #303030;
    color: #90caf9;
}

tr:hover {
    background-color: #303030;
}

/* Language selector (global toggle) */
.language-selector {
    position: fixed;
    top: 20px;
    right: 90px; /* leave room for home button on left */
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #303030;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 1000;
}

.language-label {
    color: #90caf9;
    font-size: 0.9rem;
}

.language-options {
    display: flex;
    gap: 8px;
}

.language-options a {
    text-decoration: none;
    color: #e0e0e0;
    padding: 4px 8px;
    border-radius: 12px;
    background-color: #383838;
    transition: all 0.2s ease;
}

.language-options a:hover {
    background-color: #404040;
}

.language-options a.active {
    background-color: #4285f4;
    color: #ffffff;
}
