        :root {
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --danger-color: #e74c3c;
            --light-gray: #ecf0f1;
            --dark-gray: #7f8c8d;
            --white: #ffffff;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, var(--light-gray) 0%, #bdc3c7 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .container {
            background: var(--white);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            max-width: 600px;
            width: 100%;
            padding: 40px;
            text-align: center;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .logo {
            max-height: 75px;
            height: auto;
            width: auto;
            margin-bottom: 20px;
        }

        .container.expanded {
            max-width: 1200px;
            width: 95%;
        }

        h1 {
            color: var(--primary-color);
            margin-bottom: 10px;
            font-size: 2.5rem;
            font-weight: 300;
        }

        .subtitle {
            color: var(--dark-gray);
            margin-bottom: 40px;
            font-size: 1.1rem;
        }

        .upload-container {
            display: block;
            margin-top: 20px;
            position: relative;
            overflow: hidden;
        }

        .upload-container.two-columns {
            display: flex;
            gap: 30px;
        }

        .upload-left {
            flex: 1;
            min-width: 300px;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            transform: translateX(0);
        }

        .upload-container.two-columns .upload-left {
            transform: translateX(0);
        }

        .upload-right {
            flex: 1;
            min-width: 350px;
            position: absolute;
            right: 0;
            top: 0;
            width: calc(50% - 15px);
            transform: translateX(100%);
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            opacity: 0;
        }

        .upload-container.two-columns .upload-right {
            position: relative;
            transform: translateX(0);
            opacity: 1;
            width: auto;
        }

        .upload-area {
            border: 3px dashed var(--secondary-color);
            border-radius: 12px;
            padding: 60px 20px;
            transition: all 0.3s ease;
            cursor: pointer;
            background: #f8f9fa;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .upload-container.two-columns .upload-area {
            min-height: 500px;
        }

        .upload-area:hover,
        .upload-area.dragover {
            border-color: var(--success-color);
            background: #e8f5e8;
            transform: translateY(-2px);
        }

        .upload-panel {
            background: var(--white);
            border: 1px solid #e9ecef;
            border-radius: 12px;
            padding: 20px;
            height: 500px;
            display: flex;
            flex-direction: column;
        }

        .upload-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid #e9ecef;
        }

        .upload-stats {
            font-size: 0.9rem;
            color: #6c757d;
        }

        /* Wrapper de progression avec marge */
        #progressWrapper {
            margin-top: 15px;
        }

        .upload-progress {
            margin-bottom: 20px;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #e9ecef;
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--secondary-color), var(--success-color));
            width: 0%;
            transition: width 0.3s ease;
        }

        .progress-text {
            font-size: 0.85rem;
            color: #495057;
            margin-top: 8px;
            text-align: center;
        }

        .file-list-container {
            flex: 1;
            overflow-y: auto;
            margin-bottom: 20px;
        }

        .file-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 8px;
            background: #f8f9fa;
            border-left: 3px solid transparent;
            transition: all 0.3s ease;
        }

        .file-item.uploading {
            border-left-color: var(--secondary-color);
            background: #e3f2fd;
        }

        .file-item.completed {
            border-left-color: var(--success-color);
            background: #e8f5e8;
        }

        .file-item.error {
            border-left-color: #dc3545;
            background: #f8d7da;
        }

        .file-icon {
            font-size: 1.5rem;
            margin-right: 12px;
            min-width: 24px;
        }

        .file-info {
            flex: 1;
            min-width: 0;
        }

        .file-status {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 500;
            white-space: nowrap;
        }

        .file-status.pending {
            background: #f8f9fa;
            color: #6c757d;
        }

        .file-status.uploading {
            background: var(--secondary-color);
            color: var(--white);
        }

        .file-status.completed {
            background: var(--success-color);
            color: var(--white);
        }

        .file-status.error {
            background: #dc3545;
            color: var(--white);
        }

        .file-name {
            font-weight: 500;
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .file-size {
            font-size: 0.8rem;
            color: #6c757d;
        }

        .file-status {
            font-size: 0.75rem;
            margin-left: 10px;
            padding: 2px 8px;
            border-radius: 10px;
            white-space: nowrap;
        }

        .file-status.uploading {
            background: var(--secondary-color);
            color: var(--white);
        }

        .file-status.completed {
            background: var(--success-color);
            color: var(--white);
        }

        .file-status.error {
            background: #dc3545;
            color: var(--white);
        }

        .share-section {
            background: #e8f5e8;
            border-radius: 6px;
            padding: 10px;
            border: 1px solid #d4edda;
        }

        .share-url-container {
            display: flex;
            gap: 8px;
            margin-top: 4px;
            align-items: center;
        }

        .share-url {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            background: var(--white);
            font-family: monospace;
            font-size: 0.9rem;
        }

        .btn-copy {
            background: var(--secondary-color);
            color: var(--white);
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            white-space: nowrap;
        }

        .btn-copy:hover {
            background: #2980b9;
        }

        .btn-copy-icon {
            background: var(--secondary-color);
            color: var(--white);
            border: none;
            padding: 6px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            min-width: 28px;
            height: 28px;
        }
        .share-section h5 {
            margin: 0 0 2px 0;
            font-size: 0.95rem;
            font-weight: 600;
        }
        .share-section p {
            margin: 4px 0 6px 0;
            font-size: 0.85rem;
        }

        .btn-copy-icon:hover {
            background: #2980b9;
            transform: translateY(-1px);
        }



        .btn-copy-icon svg {
            stroke: currentColor;
        }

        @media (max-width: 768px) {
            .upload-container.two-columns {
                flex-direction: column;
                gap: 20px;
            }
            
            .upload-right {
                position: relative !important;
                width: 100% !important;
                transform: translateY(100%) !important;
                opacity: 0;
            }
            
            .upload-container.two-columns .upload-right {
                transform: translateY(0) !important;
                opacity: 1;
            }
            
            .upload-panel {
                height: 400px;
            }
            
            .upload-container.two-columns .upload-area {
                min-height: 200px;
            }
        }

        .upload-icon {
            font-size: 4rem;
            color: var(--secondary-color);
            margin-bottom: 20px;
        }

        .upload-text {
            font-size: 1.2rem;
            color: var(--primary-color);
            margin-bottom: 10px;
        }

        .upload-hint {
            color: var(--dark-gray);
            font-size: 0.9rem;
        }

        .upload-additional-hint {
            color: var(--secondary-color);
            font-size: 0.85rem;
            margin-top: 8px;
            font-style: italic;
            font-weight: 500;
        }

        #fileInput {
            display: none !important;
            position: absolute !important;
            left: -9999px !important;
            opacity: 0 !important;
            width: 0 !important;
            height: 0 !important;
            visibility: hidden !important;
        }

        .btn {
            background: var(--secondary-color);
            color: var(--white);
            border: none;
            padding: 12px 30px;
            border-radius: 6px;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.3s ease;
            margin: 10px;
        }

        .btn:hover {
            background: #2980b9;
        }

        .btn-success {
            background: var(--success-color);
        }

        .btn-success:hover {
            background: #229954;
        }



        .progress-bar {
            width: 100%;
            height: 8px;
            background: #ddd;
            border-radius: 4px;
            overflow: hidden;
            margin: 0 15px;
        }

        .progress-fill {
            height: 100%;
            background: var(--success-color);
            width: 0%;
            transition: width 0.3s ease;
        }

        .share-section {
            margin-top: 8px;
            padding: 8px;
            background: #f8f9fa;
            border-radius: 6px;
            display: none;
        }

        .share-url {
            background: var(--white);
            border: 1px solid var(--light-gray);
            border-radius: 6px;
            padding: 8px 10px;
            margin: 6px 0;
            font-family: monospace;
            word-break: break-all;
            color: var(--primary-color);
            font-size: 0.85rem;
            line-height: 1.2;
        }

        .warning-message {
            background: #fff3cd;
            color: #856404;
            padding: 15px;
            border-radius: 6px;
            margin: 15px 0;
            border-left: 4px solid var(--warning-color);
        }

        .success-message {
            background: #d4edda;
            color: #155724;
            padding: 15px;
            border-radius: 6px;
            margin: 15px 0;
            border-left: 4px solid var(--success-color);
        }

        .admin-link {
            position: fixed;
            top: 20px;
            right: 20px;
            color: var(--dark-gray);
            text-decoration: none;
            font-size: 0.9rem;
        }

        .admin-link:hover {
            color: var(--primary-color);
        }

        .footer {
            margin-top: 28px;
            padding-top: 18px;
            border-top: 1px solid #e9ecef;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: var(--dark-gray);
            font-size: 0.9rem;
        }
        .footer a { color: var(--secondary-color); text-decoration: none; }
        .footer a:hover { text-decoration: underline; }

        .validation-form {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 30px;
            margin-bottom: 30px;
            border: 2px solid var(--light-gray);
        }

        /* Overlay de célébration (feu d'artifice) */
        .celebration-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            pointer-events: none;
            animation: overlayOut 2s ease forwards;
        }
        .celebration-message {
            position: absolute;
            color: var(--white);
            background: rgba(39, 174, 96, 0.95);
            padding: 14px 18px;
            border-radius: 10px;
            font-weight: 600;
            letter-spacing: 0.3px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.25);
            transform: translateY(0);
            animation: msgPop 1.8s ease both;
        }
        @keyframes msgPop { 0%{opacity:0; transform:translateY(8px) scale(0.98)} 15%{opacity:1; transform:translateY(0) scale(1)} 80%{opacity:1} 100%{opacity:0; transform:translateY(-6px) scale(0.98)} }
        @keyframes overlayOut { 0%{opacity:1} 85%{opacity:1} 100%{opacity:0} }

        .validation-form h3 {
            color: var(--primary-color);
            margin-bottom: 25px;
            text-align: center;
            font-size: 1.4rem;
            font-weight: 400;
        }

        .form-group {
            margin-bottom: 20px;
            text-align: left;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--primary-color);
            font-weight: 500;
        }

        .form-group input[type="email"],
        .form-group input[type="text"] {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid var(--light-gray);
            border-radius: 6px;
            font-size: 1rem;
            transition: border-color 0.3s ease;
            background: var(--white);
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--secondary-color);
        }

        .form-group small {
            display: block;
            margin-top: 5px;
            color: var(--dark-gray);
            font-size: 0.85rem;
        }

        .checkbox-group {
            display: flex;
            align-items: center;
            margin-bottom: 25px;
        }

        .checkbox-group label {
            display: flex;
            align-items: center;
            margin-bottom: 0;
            cursor: pointer;
        }

        .checkbox-group input[type="checkbox"] {
            margin-right: 10px;
            width: auto;
        }

        .validation-pending {
            background: #fff3cd;
            color: #856404;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-left: 4px solid var(--warning-color);
            text-align: center;
        }

        .validation-pending h4 {
            margin-bottom: 10px;
            color: #856404;
        }

        .btn-resend {
            background: var(--warning-color);
            margin-top: 10px;
        }

        .btn-resend:hover {
            background: #e67e22;
        }

        @media (max-width: 768px) {
            .container {
                padding: 20px;
                margin: 10px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .upload-area {
                padding: 40px 15px;
            }
            
            .progress-bar {
                width: 100px;
            }

            .validation-form {
                padding: 20px;
            }
        }

        .email-validated-notice {
            text-align: center;
            padding: 30px;
        }

        .email-validated-notice h3 {
            color: var(--success-color);
            margin-bottom: 20px;
            font-size: 1.5rem;
        }

        .validated-email-info {
            background: #e8f5e8;
            padding: 15px;
            border-radius: 8px;
            margin: 20px 0;
            border-left: 4px solid var(--success-color);
        }

        .email-reuse-notice {
            color: var(--dark-gray);
            font-style: italic;
            margin: 15px 0;
        }

        .folder-code-display {
            background: #f0f8ff;
            padding: 10px;
            border-radius: 6px;
            border-left: 3px solid var(--secondary-color);
        }

        .no-folder {
            color: var(--dark-gray);
            font-style: italic;
        }

        .user-info-header {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            border: 2px solid #e9ecef;
        }

        .cookie-user-form {
            text-align: center;
            padding: 20px;
        }

        .cookie-user-form h3 {
            color: var(--primary-color);
            margin-bottom: 20px;
            font-size: 1.4rem;
            font-weight: 400;
        }

        .user-info {
            margin-bottom: 25px;
        }

        .verified-email {
            background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
            border: 1px solid #d4edda;
            border-radius: 12px;
            padding: 20px;
            margin: 15px 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 8px rgba(39, 174, 96, 0.1);
            transition: all 0.3s ease;
        }

        .verified-email:hover {
            box-shadow: 0 4px 12px rgba(39, 174, 96, 0.15);
            transform: translateY(-1px);
        }

        .verified-email strong {
            color: var(--primary-color);
            font-size: 1.1rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .verified-email .email-icon {
            font-size: 1.3rem;
            color: var(--secondary-color);
        }

        .verified-badge {
            background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s ease;
        }

        .verified-badge:hover {
            transform: scale(1.05);
        }

        .verified-badge::before {
            content: "✓";
            font-size: 1rem;
            font-weight: bold;
        }

        .user-session-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .user-email, .user-folder {
            font-weight: 500;
            color: var(--primary-color);
        }

        .btn-small {
            padding: 6px 12px;
            font-size: 0.85rem;
        }

        .user-actions {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            margin-top: 10px;
            position: relative;
            width: 100%;
        }

        .user-actions .btn-folder {
            position: absolute;
            right: 0;
        }

        .btn-folder {
            background: #2980b9;
            color: var(--white);
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.85rem;
        }

        .btn-folder:hover {
            background: #1f5582;
        }

        .btn-email {
            background: #f39c12;
            color: var(--white);
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.85rem;
        }

        .btn-email:hover {
            background: #e67e22;
        }

        .btn-change {
            background: var(--warning-color);
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .btn-change:hover {
            background: #e67e22;
        }

        /* Modal pour modifier le code dossier - Design cohérent */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(44, 62, 80, 0.6); /* Utilise primary-color pour l'overlay */
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background: var(--white);
            padding: 30px;
            border-radius: 12px; /* Même arrondi que .container */
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Même ombre que .container */
            max-width: 500px;
            width: 90%;
            transform: translateY(-20px);
            transition: transform 0.3s ease;
            border: 1px solid var(--light-gray); /* Même bordure que les autres éléments */
        }

        .modal-overlay.active .modal-content {
            transform: translateY(0);
        }

        .modal-header {
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--light-gray); /* Cohérent avec les séparateurs */
            text-align: center;
        }

        .modal-title {
            font-size: 1.8rem; /* Cohérent avec les autres titres */
            font-weight: 600;
            color: var(--primary-color);
            margin: 0;
            font-family: inherit;
        }

        .modal-close {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            font-size: 1.8rem;
            cursor: pointer;
            color: var(--dark-gray);
            padding: 5px;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .modal-close:hover {
            background: var(--light-gray);
            color: var(--primary-color);
        }

        .modal-body {
            margin-bottom: 25px;
        }

        .modal-form-group {
            margin-bottom: 20px;
        }

        .modal-form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--primary-color); /* Cohérent avec les autres labels */
        }

        .modal-input {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid var(--light-gray); /* Cohérent avec les autres inputs */
            border-radius: 8px;
            font-size: 1rem;
            transition: border-color 0.3s ease; /* Même transition que les autres inputs */
            box-sizing: border-box;
            background: var(--white);
        }

        .modal-input:focus {
            outline: none;
            border-color: var(--secondary-color); /* Utilise secondary-color pour focus */
            box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
        }

        .modal-hint {
            font-size: 0.9rem;
            color: var(--dark-gray);
            margin-top: 8px;
            font-style: italic;
        }

        .modal-current {
            background: var(--light-gray); /* Cohérent avec les backgrounds */
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-left: 4px solid var(--secondary-color); /* Utilise secondary-color */
        }

        .modal-current-label {
            font-size: 0.9rem;
            color: var(--dark-gray);
            margin-bottom: 5px;
            font-weight: 500;
        }

        .modal-current-value {
            font-weight: 600;
            color: var(--primary-color);
            font-family: 'Courier New', monospace;
            font-size: 1.1rem;
        }

        .modal-actions {
            display: flex;
            gap: 15px;
            justify-content: center; /* Centrer les boutons comme dans le reste de l'app */
            padding-top: 15px;
            border-top: 2px solid var(--light-gray);
        }

        .modal-btn {
            padding: 12px 30px; /* Même padding que .btn */
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease; /* Même transition que .btn */
            min-width: 120px;
        }

        .modal-btn-primary {
            background: var(--secondary-color); /* Utilise secondary-color comme .btn */
            color: var(--white);
        }

        .modal-btn-primary:hover {
            background: #2980b9; /* Même hover que .btn */
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }

        .modal-btn-secondary {
            background: var(--dark-gray);
            color: var(--white);
        }

        .modal-btn-secondary:hover {
            background: #34495e;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(127, 140, 141, 0.3);
        }

        @media (max-width: 480px) {
            .modal-content {
                margin: 20px;
                padding: 25px;
            }
            
            .modal-actions {
                flex-direction: column;
            }
            
            .modal-btn {
                width: 100%;
            }
            
            .user-actions {
                flex-direction: column;
                gap: 8px;
                align-items: stretch;
                position: static;
            }
            
            .user-actions .btn-small {
                width: 100%;
                text-align: center;
                position: static !important;
                right: auto !important;
            }
        }

        .identified-user {
            text-align: center;
        }

        .identified-email {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 6px;
            margin: 15px 0;
            border: 1px solid #e9ecef;
            text-align: left;
        }

        .identified-email label {
            font-size: 0.9rem;
            color: #6c757d;
            margin-bottom: 5px;
            display: block;
            text-align: left;
        }

        .email-display {
            font-size: 1rem;
            color: #495057;
            margin: 5px 0 0 0;
            padding: 0;
            background: none;
            border: none;
            font-family: monospace;
            text-align: left;
        }

        .email-status {
            font-size: 0.8rem;
            color: #28a745;
            margin-top: 3px;
            font-weight: 500;
            text-align: left;
        }

        .change-email-option {
            margin-top: 15px;
        }

        .btn-link {
            background: none;
            border: none;
            color: #6c757d;
            text-decoration: underline;
            cursor: pointer;
            font-size: 0.85rem;
            padding: 0;
        }

        .btn-link:hover {
            color: var(--primary-color);
            text-decoration: none;
        }

        @media (max-width: 768px) {
            .user-session-info {
                flex-direction: column;
                text-align: center;
            }
        }
