:root {
    --primary-color: #16a5a5; /* Turquoise */
    --secondary-color: #ffbf00; /* Ambre */
    --accent-color: #ffd700; /* Or */
    --background-color: #f2eecb; /* Fond crème */
    --text-color: #333333;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: url('../img/bg-pattern.png');
    background-repeat: repeat;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    text-align: center;
    box-shadow: var(--box-shadow);
}

header .logo {
    max-width: 200px;
    margin: 0 auto;
}

header .logo img {
    width: 100%;
    height: auto;
}

header h1 {
    margin: 10px 0;
    font-weight: 700;
    font-size: 2.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.main-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 30px auto;
    padding: 30px;
    max-width: 800px;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.error-message, .success-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

.error-message {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--error-color);
    color: var(--error-color);
}

.success-message {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

/* Styles pour le formulaire d'upload */
.upload-container {
    text-align: center;
}

.file-input-container {
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    margin-bottom: 20px;
    transition: var(--transition);
    background-color: rgba(22, 165, 165, 0.05);
    position: relative;
}

.file-input-container.highlight {
    background-color: rgba(22, 165, 165, 0.15);
    border-color: var(--accent-color);
}

.file-input-container input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.file-label span {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.file-label small {
    color: #666;
    font-style: italic;
}

.file-list {
    margin-top: 20px;
    text-align: left;
}

.file-item {
    padding: 10px;
    margin-bottom: 5px;
    background-color: rgba(22, 165, 165, 0.1);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
}

.file-name {
    font-weight: 600;
    word-break: break-all;
}

.file-size {
    color: #666;
    margin-left: 10px;
    white-space: nowrap;
}

/* Styles pour la barre de progression */
/* Styles pour la barre de progression */
.upload-progress-container {
    margin: 20px 0;
    width: 100%;
    display: none; /* Caché par défaut, sera affiché via JavaScript */
}

.upload-progress {
    height: 30px;
    background-color: #eee;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0; /* Commence à 0% */
    position: absolute;
    left: 0;
    top: 0;
    transition: width 0.3s ease;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 40px 40px;
    animation: progress-bar-stripes 2s linear infinite;
}

@keyframes progress-bar-stripes {
    from { background-position: 40px 0; }
    to { background-position: 0 0; }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
    z-index: 5;
    pointer-events: none; /* Évite que le texte n'interfère avec les interactions */
}

.captcha-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.buttons-container {
    margin-top: 20px;
}

.submit-button, .download-button, .copy-button, .reset-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.submit-button:hover, .download-button:hover, .copy-button:hover, .reset-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.download-button {
    background-color: var(--secondary-color);
    display: inline-block;
}

.copy-button {
    background-color: var(--accent-color);
    color: var(--text-color);
    margin-top: 10px;
}

.reset-button {
    background-color: #95a5a6;
    margin-top: 20px;
}

/* Styles pour la page de téléchargement */
.download-container {
    text-align: center;
}

.file-info {
    background-color: rgba(22, 165, 165, 0.05);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.file-info p {
    margin-bottom: 10px;
}

.file-info p:last-child {
    margin-bottom: 0;
}

/* Styles pour le formulaire de connexion */
.login-container {
    max-width: 400px;
    margin: 0 auto;
}

.login-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 165, 165, 0.2);
}

/* Styles pour le résultat d'upload */
.upload-result {
    text-align: center;
    margin-top: 20px;
}

.upload-result h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-result p {
    margin-bottom: 15px;
}

.download-link {
    font-weight: 600;
    word-break: break-all;
}

/* Styles pour la page d'erreur */
.error-container {
    text-align: center;
}

.error-container h2 {
    color: var(--error-color);
}

.error-container p {
    margin-bottom: 20px;
}

.button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.button:hover {
    background-color: var(--accent-color);
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #666;
    font-size: 0.9em;
}

/* Styles rétro-futuristes / Cthulhu */
.cthulhu-border {
    border: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.cthulhu-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    animation: borderGlow 3s infinite alternate;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.cthulhu-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background-image: url('../img/ui/cthulhu-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    margin-right: 10px;
}
/* Style pour le message de transfert */
.upload-message {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-message p {
    color: #333;
    font-weight: 600;
    font-size: 1.1em;
    margin: 0;
}

/* Option: ajouter une animation pour montrer que quelque chose se passe */
@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}
