/* ============================================
   Variables et Reset
   ============================================ */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --error: #e53e3e;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #2d3748;
    --text-light: #4a5568;
    --text-secondary: #718096;
    --border: #cbd5e0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* ============================================
   Modal
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--border);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   Écran d'authentification
   ============================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    animation: fadeInUp 0.6s ease;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: inline-block;
}

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

a .logo {
    margin: 0;
}

.tagline {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.auth-form h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: fadeInUp 0.4s ease;
}

.nav-container {
    width: 100%;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border-radius: 20px;
    flex-wrap: nowrap;
}

.nav-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: inline-block;
}

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

a .nav-logo {
    margin: 0;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-tab {
    padding: 0.7rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    background: #f7fafc;
    color: var(--text);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-logout {
    padding: 0.7rem 1.5rem;
    border: none;
    background: #e53e3e;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.nav-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================
   Contenu principal
   ============================================ */
.main-content {
    width: 100%;
    margin: 0;
    padding: 2rem;
    animation: fadeInUp 0.6s ease;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.container h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
    position: relative;
    padding-bottom: 1rem;
}

.container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* Style pour les numéros d'étape - cercle avec numéro */
.card > section > h3:first-child,
.card > div > h3:first-child {
    padding-left: 50px;
}

.card > section > h3:first-child::before,
.card > div > h3:first-child::before {
    content: '1';
    position: absolute;
    left: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    flex-shrink: 0;
    line-height: 35px;
    text-align: center;
}

/* Masquer le "1. " du texte original */
.card > section > h3:first-child,
.card > div > h3:first-child {
    text-indent: -2.5ch;
    padding-left: 52px;
}

/* Pour le deuxième h3 */
.card > div > h3:nth-of-type(2) {
    padding-left: 50px;
}

.card > div > h3:nth-of-type(2)::before {
    content: '2';
    position: absolute;
    left: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    flex-shrink: 0;
    line-height: 35px;
    text-align: center;
}

.card > div > h3:nth-of-type(2) {
    text-indent: -2.5ch;
    padding-left: 52px;
}

/* ============================================
   Upload
   ============================================ */
.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-content {
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 5rem;
    display: block;
    margin-bottom: 1rem;
    color: #667eea;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 6px;
    color: var(--text);
}

/* ============================================
   Éditeur de placement
   ============================================ */
.editor-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.element-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.element-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    background: var(--bg-card);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.element-btn:hover {
    border-color: var(--primary);
    background: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.element-btn.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.size-controls {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.size-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.size-controls input[type="range"] {
    width: 150px;
}

.canvas-container {
    position: relative;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: auto;
    background: var(--bg);
}

#pdfCanvas,
#overlayCanvas {
    display: block;
    width: 100%;
    height: auto;
}

#overlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
    cursor: crosshair;
    z-index: 10;
}

/* S'assurer que les deux canvas sont superposés */
#pdfCanvas {
    position: relative;
    z-index: 1;
}

#overlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* ============================================
   Documents
   ============================================ */

/* Titre "Mes documents" avec barre de soulignement */
#documentsTab .container h2 {
    font-size: 2.5rem;
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

#documentsTab .container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Filtre par dossier */
.folder-filter {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.folder-filter label {
    font-weight: 500;
    color: var(--text);
    font-size: 1rem;
}

.folder-filter select {
    padding: 0.7rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.folder-filter select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Grille de documents */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Cards de documents */
.document-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.document-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

/* Nom du document avec icône PDF */
.document-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.document-card h4::before {
    content: '📄';
    font-size: 1.5rem;
    display: inline-block;
}

/* Infos (Dossier + Date) avec icônes */
.document-meta {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.document-meta p {
    margin: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-meta p:first-child::before {
    content: '📁';
    font-size: 1rem;
}

.document-meta p:last-child::before {
    content: '📅';
    font-size: 1rem;
}

/* Badge "Signé" */
.document-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.document-status.uploaded {
    background: rgba(237, 137, 54, 0.1);
    color: #ed8936;
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

.document-status.signed {
    background: #48bb78;
    color: white;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.document-status.draft {
    background: rgba(113, 128, 150, 0.1);
    color: #718096;
    box-shadow: 0 2px 8px rgba(113, 128, 150, 0.3);
}

/* Actions des documents */
.document-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Bouton Télécharger */
.document-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.document-actions .btn-primary::before {
    content: '⬇️';
    font-size: 1rem;
}

.document-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Bouton Vérifier */
.document-actions .btn-secondary {
    background: #2d3748;
    border-radius: 12px;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.document-actions .btn-secondary:hover {
    background: #1a202c;
    transform: translateY(-2px);
}

/* Dropdown "Général" (déplacer dossier) */
.document-actions .folder-select {
    padding: 0.6rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%234a5568' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.document-actions .folder-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Bouton Supprimer */
.document-actions .btn-danger {
    background: #e53e3e;
    border-radius: 12px;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.document-actions .btn-danger::before {
    content: '🗑️';
    font-size: 1rem;
}

.document-actions .btn-danger:hover {
    background: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

/* ============================================
   Profil
   ============================================ */

/* Titre "Mon profil" avec barre de soulignement */
#profileTab .container h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

#profileTab .container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.profile-form {
    width: 100%;
}

.profile-summary {
    width: 100%;
    margin-bottom: 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
}

.profile-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.profile-logo-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    flex-shrink: 0;
}

.profile-logo-placeholder {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    padding: 0.5rem;
}

.profile-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-header-text {
    flex: 1;
}

.profile-header-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.profile-name {
    font-size: 1rem;
    color: #718096;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.profile-email {
    font-size: 0.95rem;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-email::before {
    content: '✉️';
    font-size: 1rem;
}

.profile-bio {
    margin-top: 2rem;
}

.profile-bio h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin: 2rem 0 1rem 0;
    padding-left: 1rem;
    position: relative;
}

.profile-bio h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.profile-bio-text {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.7;
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 3px solid #667eea;
}

.profile-assets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.profile-asset {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.profile-asset:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.profile-asset h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.profile-asset-visual {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: white;
    padding: 2rem 1rem;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-asset-image {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.profile-asset-info {
    font-size: 0.85rem;
    color: #48bb78;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-asset-info::before {
    content: '✓';
    color: #48bb78;
    font-weight: 700;
}

.file-uploads {
    display: grid;
    gap: 1.5rem;
}

.file-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.file-status.has-file {
    color: var(--success);
}

/* ============================================
   Paramètres
   ============================================ */

/* Titre "Paramètres" avec barre de soulignement */
#settingsTab .container h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

#settingsTab .container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Cards des sections */
#settingsTab .card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* Titres de sections */
#settingsTab .card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Labels de formulaire */
#settingsTab .form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    display: block;
}

/* Inputs text */
#settingsTab .form-group input[type="text"],
#settingsTab .form-group input[type="email"],
#settingsTab .form-group input[type="text"]:disabled {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

#settingsTab .form-group input[type="text"]:disabled {
    background: #f7fafc;
    color: #718096;
    cursor: not-allowed;
}

#settingsTab .form-group input[type="text"]:focus,
#settingsTab .form-group input[type="email"]:focus {
    outline: none;
    border: 2px solid #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Layout Prénom + Nom */
#settingsTab .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Textarea */
#settingsTab .form-group textarea {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    width: 100%;
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
    font-family: inherit;
    transition: all 0.3s ease;
}

#settingsTab .form-group textarea:focus {
    outline: none;
    border: 2px solid #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Description explicative */
#settingsTab .section-hint {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 1.5rem;
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    line-height: 1.6;
}

/* Champs upload */
#settingsTab .file-uploads .form-group {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

#settingsTab .file-uploads .form-group:hover {
    border-color: #667eea;
}

/* Label upload */
#settingsTab .file-uploads .form-group label {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    display: block;
    margin-bottom: 0.8rem;
}

/* Input file - style personnalisé */
#settingsTab .file-uploads .form-group input[type="file"] {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Style du bouton "Choisir un fichier" via label */
#settingsTab .file-uploads .form-group input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-right: 1rem;
}

#settingsTab .file-uploads .form-group input[type="file"]::file-selector-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Texte du file input */
#settingsTab .file-uploads .form-group input[type="file"] {
    color: #a0aec0;
    font-size: 0.85rem;
}

/* Badge "✓ Défini" */
#settingsTab .file-status.has-file {
    background: #48bb78;
    color: white;
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

#settingsTab .file-status.has-file::before {
    content: '✓ ';
    font-weight: 700;
}

/* Bouton "Enregistrer les paramètres" */
#settingsTab .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 3rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 2rem;
    transition: all 0.3s ease;
}

#settingsTab .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ============================================
   Résultats
   ============================================ */
.result-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ============================================
   Messages de statut
   ============================================ */
.status-message {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

.status-message.success {
    background: var(--success);
    color: white;
}

.status-message.error {
    background: var(--error);
    color: white;
}

.status-message.info {
    background: var(--primary);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.loading {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
    }

    .nav-logo {
        font-size: 1.4rem;
    }

    .nav-tabs {
        order: 3;
        width: 100%;
        justify-content: space-around;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .nav-tab {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .nav-actions {
        gap: 0.5rem;
        margin-left: auto;
    }

    .nav-actions .btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.75rem;
    }

    .card {
        padding: 2rem 1.5rem;
    }

    .container h2 {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .size-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .size-controls label {
        flex-direction: column;
        align-items: stretch;
    }

    .size-controls input[type="range"] {
        width: 100%;
    }

    .upload-area {
        padding: 3rem 1.5rem;
    }

    .upload-icon {
        font-size: 4rem;
    }

    /* Profil responsive */
    .profile-summary {
        padding: 1.5rem;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-header-text {
        width: 100%;
    }

    .profile-header-text h3 {
        margin-top: 1rem;
    }

    .profile-assets {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #profileTab .container h2 {
        font-size: 2rem;
    }

    #documentsTab .container h2 {
        font-size: 2rem;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    /* Paramètres responsive */
    #settingsTab .container h2 {
        font-size: 2rem;
    }

    #settingsTab .card {
        padding: 1.5rem;
    }

    #settingsTab .form-row {
        grid-template-columns: 1fr;
    }

    #settingsTab .btn-primary {
        width: 100%;
        padding: 1rem 2rem;
    }
}

/* ============================================
   Boutons
   ============================================ */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #2d3748;
    color: white;
}

.btn-secondary:hover {
    background: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 55, 72, 0.3);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

/* ============================================
   Sélecteur de langue dans les paramètres
   ============================================ */
.language-selector-settings {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.language-option-settings {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.language-option-settings:hover {
    border-color: var(--primary);
    background: #f0f4ff;
    transform: translateX(5px);
}

.language-option-settings.active {
    border-color: var(--primary);
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.language-option-settings .language-flag {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.language-option-settings .language-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
}

/* Support RTL */
body[dir="rtl"] {
    direction: rtl;
}

body[dir="rtl"] .language-option-settings:hover {
    transform: translateX(-5px);
}