* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Styles de base et Grille --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0;
}
/* Header et Navigation */
.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 2px 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background-color: #346997;
    border-bottom: 1px solid #eaeaea;
    white-space: nowrap;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-weight: bold;
    font-size: 1.8em;
    color: #e1e8e5;
    text-decoration: none;
}

.logo:hover {
    color: #fff;
}

/* Styles pour le menu déroulant */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    z-index: 1000;
    padding: 8px 0;
    border: 1px solid #eaeaea;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 0.95em;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #238b43;
}

/* Assurer que le menu déroulant ne perturbe pas l'alignement */
.nav-menu {
    display: flex;
    gap: 0.2rem;
    flex-wrap: nowrap;
    align-items: center;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    padding: 0.5rem 0.4rem;
    text-decoration: none;
    color: #e2e5e8;
    font-size: 1em;
    white-space: nowrap;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.dropdown-toggle::after {
    content: "▼";
    font-size: 0.7em;
    margin-left: 4px;
}

.nav-item:hover {
    background-color: #238b43;
}

/* Correction pour aligner tous les éléments de droite */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    margin-left: auto;
}

/* Conteneur pour les jetons */
.jetons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.jetons-label {
    font-size: 0.9em;
    color: #edeaea;
    font-weight: normal;
}

.jetons-count {
    font-weight: bold;
    color: #052950;
    padding: 0.3rem 1rem;
    background-color: #0da123;
    border-radius: 20px;
    border: 1px solid #cce5ff;
    font-size: 1.2em;
    min-width: 60px;
    text-align: center;
}

/* Conteneur pour email et déconnexion */
.user-profile-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    align-items: start;
}

.user-email {
    color: #021611;
    font-size: 1.1em;
    padding: 0;
}

.user-logout a {
    color: #01150b;
    text-decoration: none;
    font-size: 0.95em;
    padding: 0.1rem 0;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap;
    display: block;
    border-style: dashed;
    border-color: #850919;
}
.user-login a {
    color: #1133c8;
    text-decoration: none;
    font-size: 0.95em;
    padding: 0.1rem 0;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap;
    display: block;
    border-style: dashed;
    border-color: #b9b1b2;
}

.user-logout a:hover {
    background-color: rgba(231, 40, 40, 0.1);
}

.user-logout {
    text-align: left;
}

@media (max-width: 1200px) {
    .nav-container {
        gap: 0.3rem;
    }
    
    .nav-menu {
        gap: 0.1rem;
    }
    
    .nav-item {
        padding: 0.4rem 0.5rem;
        font-size: 0.9em;
    }
    
    .nav-right {
        gap: 0.8rem;
    }
}

/* BANNIÈRE SLOGAN */
.slogan-banner {
    background-color: #c0d2e4;
    border-bottom: 1px solid #e0e0e0;
    height: 5em; /* Hauteur fixe pour contrôler la bannière */
    color: #031924;
    font-size: 1.6em;
}

.slogan-container {
    display: flex;
    align-items: center;
    height: 100%; /* Prendre toute la hauteur de la bannière */
}

/* Logo qui prend toute la hauteur */
.slogan-logo-container {
    background-color: #c0d2e4;
    height: 100%; /* 100% de la hauteur de la bannière */
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center; /* Centrer le logo horizontalement */
    border-right: 1px solid #7aecea;
}

.slogan-logo {
    height: 80%; /* Logo à 80% de la hauteur pour avoir une marge */
    max-height: 125px; /* Limite maximale */
    width: auto;
    object-fit: contain;
    border-radius: 40%;
}

/* Texte centré dans l'espace restant */
.slogan-text-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0 10px;
    color: #063666;
}

/* Contenu Principal */
.main-container {
    max-width: 1400px;
    margin: 10px auto;
    padding: 0 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0px;
}

/* Grille à 3 colonnes pour les sections d'upload */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr)); /* Trois colonnes, chaque colonne peut descendre jusqu'à 280px */
    gap: 20px;
    margin: 20px;
    padding-bottom: 30px;
}

.upload-grid > section {
    min-width: 0; /* Permet aux colonnes de se rétrécir en dessous de leur contenu */
    overflow-x: auto; /* Barre de défilement horizontale si le contenu dépasse (rare) */
}
/* --- Sections (Colonnes) --- */
section {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    min-height: 400px;  /* hauteur zone upload--- */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background-color: #b4d2f5;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title h2 {
    margin: 0;
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 700;
}

/* --- Boutons de groupe --- */
.btn-bulk-delete {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    display: none; /* Caché par défaut, affiché si sélection */
    transition: all 0.2s;
}
.btn-bulk-delete:hover { background: #c0392b; }

/* --- Zones d'Upload --- */
.upload-area {
    border: 2px dashed #0c8fa7;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background: #cdf1e8;
    cursor: pointer;
    color: #000209;
}
.upload-area:hover { background: #edeff1; }
.upload-pdf .upload-area { border-color: #3498db; }
.upload-image .upload-area { border-color: #3097ba; }

/* --- Tableaux Harmonisés --- */
.file-list-scroll {
    max-height: 230px; /* hauteur barre de defilement--- */
    overflow-y: auto;
    scrollbar-width: thin;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.file-table thead tr {
    text-align: left;
    border-bottom: 2px solid #0f6074;
    position: sticky;
    top: 0;
    background: rgb(137, 196, 230);
    z-index: 10;
    
}

.file-table th, .file-table td {
    padding: 10px 8px;
    vertical-align: middle;
}

.file-table th {
    color: #021221;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7em;
}

.file-table tbody tr { border-bottom: 1px solid #4075a9; }
.file-table tbody tr:hover { background: #b4d8df; }

/* Case à cocher */
.col-check { width: 30px; text-align: center; }
input[type="checkbox"] { cursor: pointer; transform: scale(1.1); }

/* Cellules spécifiques */
.filename-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2c3e50;
}

.actions-cell {
    text-align: right;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;
}

/* Boutons d'action */
.btn-action {
    border: none;
    padding: 5px 8px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}
.btn-view { background: #f0f9ff; color: #3498db; border: 1px solid #dcf0ff; }
.btn-delete { background: #fff5f5; color: #e74c3c; border: 1px solid #ffe3e3; }
.btn-download { background: #3498db; color: white; text-decoration: none; padding: 5px 10px; border-radius: 5px; font-weight: 600; font-size: 0.85em; }

/* Badges */
.badge-info {
    background: #e1f5fe;
    color: #0288d1;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

/* --- Style Flash Message pour le compteur local --- */
.count-flash {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    font-size: 0.9em;
}
.count-flash.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
.count-flash.info {
    background-color: #cce5ff;
    color: #004085;
    border-color: #b8daff;
}

/* --- Style pour les messages Flash Globaux --- */
.flash-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
}
.alert {
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    position: relative;
}

/* Message d'information amélioré */
.file-info {
    background: #619ad2;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
    padding: 10px 15px;
    margin-top: 15px;
    color: #f0f2f2;
    font-size: 16px;
    text-align: center;
}

.file-info.has-files {
    background: #5d9beb;
    border-color: #c3e6cb;
    color: #155724;
}

/* Animation pour les nouveaux fichiers */
@keyframes highlightNewFile {
    0% { background-color: #e8f5e8; }
    100% { background-color: transparent; }
}

.file-item.new-file {
    animation: highlightNewFile 2s ease-out;
}
.btn-visualiser {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 5px;
    border: none;
    cursor: pointer;
}

.btn-visualiser:hover {
    background-color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-visualiser:active {
    transform: translateY(0);
}

/* Section Fichiers Générés */
/* Styles pour le tableau des fichiers */
.file-table-scroll {
    max-height: 140px;
    overflow-y: auto;
    border: 1px solid #3676db;
    border-radius: 8px;
    margin-top: 6px;
}

.file-table tbody tr.selected {
    background-color: #1fdb7a !important;
}

.file-item-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #000209;
}

.btn-view:hover { background: #3498db; color: white; }
.btn-delete:hover { background: #e74c3c; color: white; }
.btn-download:hover { background: #2980b9; }

.file-list-actions {
    display: flex;
    gap: 10px;
}

.select-all-btn, .delete-selected-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.select-all-btn {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.select-all-btn:hover {
    background: #bbdefb;
}

.delete-selected-btn {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.delete-selected-btn:hover {
    background: #ffcdd2;
}

.file-item:hover {
    background-color: #60f2ed;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 18px;
    color: #666;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-details strong {
    color: #333;
    font-size: 14px;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-details small {
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}

.page-count {
    background: #ededef;
    color: #0c120d;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.file-type {
    background: #e3f2fd;
    color: #01080f;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.file-date {
    color: #010812;
    font-size: 12px;
}

/* Boutons d'actions */
.file-actions {
    display: flex;
    gap: 8px;
}

.visualiser-btn {
    padding: 6px 12px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 85px;
    justify-content: center;
}

.visualiser-btn:hover {
    background: #0da724;
    transform: translateY(-1px);
}

.delete-btn {
    padding: 6px 10px;
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: #da3c4c;
    transform: translateY(-1px);
}

/* Information de sélection */
.selection-info {
    padding: 10px 20px;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 14px;
    border-top: 1px solid #bbdefb;
}

/* État vide */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-style: italic;
}

/* Checkbox */
input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.file-icon-small {
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
}

.filename-truncate {
    color: #333;
    font-weight: 500;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.file-hash {
    color: #888;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    display: block;
    margin-top: 1px;
}

/* Date compacte */
.compact-file-date {
    color: #1976d2;
    font-weight: 500;
    font-size: 11px;
}

.compact-file-date-full {
    color: #666;
    font-size: 10px;
}

/* Actions compactes */
.compact-file-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.compact-visualiser-btn, .compact-delete-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.compact-visualiser-btn {
    background: #8b5cf6;
    color: white;
}

.compact-visualiser-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.compact-delete-btn {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.compact-delete-btn:hover {
    background: #ffcdd2;
    transform: translateY(-1px);
}

.file-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.file-list-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.file-list-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.file-list-scroll::-webkit-scrollbar-thumb:hover {
    background: #60ecbf;
}
    
.filename-truncate {
    max-width: 90px;
    font-size: 10px;
}
    
.view-btn, .download-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Bouton Télécharger (existant) */
.download-btn {
    background-color: #10b981;
    color: white;
    min-width: 40px;
    justify-content: center;
}

.download-btn:hover {
    background-color: #0ea271;
    transform: translateY(-1px);
}

/* Pour conserver la compatibilité avec l'ancien bouton view-btn */
.view-btn {
    background-color: #3b82f6;
    color: white;
    min-width: 40px;
    justify-content: center;
}

.view-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}
/* Boutons de contrôle */
.select-btn, .deselect-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.select-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.deselect-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Cases à cocher */
.result-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
}

#selectAllResults {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2c3e50;
}

/* Badge de comptage */
#selectedCountBadge {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    display: inline-block;
}

/* Scrollbar personnalisée */
.file-table-scroll::-webkit-scrollbar {
    width: 8px;
}

.file-table-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.file-table-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.file-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Menu des Actions PDF - COMPACT */
.actions-menu {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
    border-color: #0a325d;
}

.actions-menu-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #03172c;
    margin-bottom: 12px;
    padding-bottom: 7px;
    border-bottom: 2px solid #eaeff0;
}

.actions-menu-title h2 {
    font-size: 1.8em;
    font-weight: 900;
}

/* Grille d'actions compacte */
.actions-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    font-size: 1.4em;
}

.action-btn {
    background: linear-gradient(135deg, #3b5e82, #e9ecef);
    border: none;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    font-size: medium;
    height: 100%;
    min-height: 100px;
}

.action-btn:hover {
    background: linear-gradient(135deg, #e0f7ff, #b3e0ff);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.15);
}

.action-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.25);
}

.action-btn.active .btn-icon {
    color: white;
}

/* ICÔNES AUGMENTÉES DE 20% */
.btn-icon {
    font-size: 2.16em;
    color: #3498db;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-title {
    font-weight: 600;
    font-size: 0.85em;
    line-height: 1.2;
}

/* Zone de contenu dynamique */
.content-area {
    display: none;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.action-content {
    background: white;
    border-radius: 12px;
    padding: 17px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.help-content {
    background: linear-gradient(135deg, #f0f9ff, #e0f7ff);
    border-radius: 12px;
    padding: 17px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #3498db;
}

.content-title {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.3em;
}

.content-help-title {
    color: #3498db;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #bae6fd;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.files-to-combine {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    min-height: 200px;
}

.file-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 7px;
    border: 2px solid #e9ecef;
    cursor: move;
    transition: all 0.3s;
}

.result-name {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-name input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1em;
}

.combine-btn {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Styles pour les autres actions */
.action-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.page-selection {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.page-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.page-input {
    flex: 1;
    min-width: 120px;
}

.btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.btn-warning {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.help-list {
    list-style: none;
    padding: 0;
}

.help-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.help-list li:before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 0;
}

/* FONCTIONNALITES (Structure à Onglets) */
.features-container {
    max-width: 1450px;
    margin: 2px auto;
    padding: 0 10px;

    padding-top: 0%;
}

.features-header {
    font-size: 1.6em;
    color: #165ea6;
    margin-bottom: 7px;
    margin-TOP: 6px;
    font-weight: bold;
}

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 3px solid #4abbe0;
    margin-bottom: 15px;
    
}

.tab-button {
    background-color: #91b0d2;
    color: #2c3e50;
    padding: 10px 15px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 700;
}

.tab-button.active {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
    margin-bottom: -3px;
    position: relative;
    z-index: 10;
}

.tab-button:not(.active):hover {
    background-color: #e0e0e0;
}

.tab-content {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 0 8px 8px 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
    border-top: none;
    flex-wrap: wrap;
}

/* Style pour les sections de formulaire dans les onglets */
.feature-form-section {
    flex: 1 1 calc(50% - 15px);
    min-width: 300px;
    padding: 15px;
    border: 1px solid #68c1e8;
    border-radius: 6px;
    background: #e1e5e8;
    margin-top: 6px;
}

/* Titre interne de chaque fonction dans l'onglet */
.feature-form-section h2 {
    color: #3498db;
    margin-bottom: 10px;
    border-bottom: 2px solid #2d575a;
    padding-bottom: 5px;
    font-size: 18px;
}

.feature-form-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.feature-form-section input[type="text"],
.feature-form-section input[type="number"],
.feature-form-section select,
.feature-form-section textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.feature-button {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

.btn-secondary {
    background: #6c757d;
    margin-top: 5px;
}

.file-list-combiner {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Drag-and-Drop */
.sortable-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #fff;
    border: 1px solid #3594bc;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 14px;
}

.drag-handle {
    cursor: move;
    margin-right: 10px;
    color: #888;
    user-select: none;
}

.sortable-ghost {
    opacity: 0.4;
    background: #cce5ff;
}

/* Section Informations Produit */
.product-info-section {
    background: #dae8e4;
    color: white;
    padding: 40px 20px;
    margin-top: 40px;
}

.product-info-container {
    max-width: 1200px;
    margin: 0 auto;
}

.product-info-header {
    text-align: center;
    margin-bottom: 40px;
}

.product-info-header h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: rgb(9, 4, 27);
}

.product-tagline {
    font-size: 1.2em;
    color: #02090f;
    max-width: 700px;
    margin: 0 auto;
}

.product-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force 4 colonnes égales */
    gap: 20px;
    margin-bottom: 20px;
}

.feature-card {
    background: rgba(128, 229, 189, 0.1);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(27, 181, 135, 0.1);
    height: 100%;
    width: 100%; /* Changé de 110% à 100% */
    box-sizing: border-box; /* Inclut le padding dans la largeur */
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(57, 156, 179, 0.15);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 4px;
    display: block;
}

.feature-card h3 {
    font-size: 1.2em;
    margin-bottom: 8px;
    color: rgb(11, 64, 123);
    line-height: 1.3;
}

.feature-card p {
    color: #04041b;
    line-height: 1.4;
    font-size: 0.9em;
    margin: 0;
}

/* Version tablette : 2 colonnes */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
    min-width: 140px;
}

.stat-number {
    font-size: 2.2em;
    font-weight: bold;
    color: #07385a;
    margin-bottom: 8px;
}

.stat-label {
    color: #021c38;
    font-size: 0.9em;
}

.product-cta {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-top: 20px;
}

.product-cta h3 {
    font-size: 1.6em;
    margin-bottom: 8px;
    color: rgb(22, 2, 2);
}

.product-cta p {
    color: #072d54;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1em;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.cta-btn.primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: rgb(43, 19, 148);
}

.guest-link {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: rgb(43, 19, 148);
    border-radius: 50px;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.cta-btn.secondary {
    background: #4299e1;
    color: rgb(47, 10, 134);
    border: 2px solid white;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cta-btn.primary:hover {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
}

.cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .product-info-header h2 {
        font-size: 1.8em;
    }
    
    .product-stats {
        gap: 20px;
    }
    
    .stat-item {
        min-width: 120px;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .product-cta {
        padding: 25px 15px;
        margin-top: 25px;
    }
}

@media (max-width: 480px) {
    .product-features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .product-info-header h2 {
        font-size: 1.5em;
    }
    
    .product-tagline {
        font-size: 1em;
    }
    
    .product-cta {
        margin-top: 20px;
        padding: 20px 10px;
    }
}

/* Footer */
.footer {
    background: #5f6c79;
    color: white;
    padding: 15px 20px;
    margin-top: 30px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    font-size: 0.9em;
}

.footer-bottom {
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: #153454;
    color: white;
    font-size: 1em;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 15px;
}

.footer-bottom a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9em;
}

.footer-bottom a:hover {
    color: white;
    text-decoration: underline;
}

/* Pour mobile */
@media (max-width: 768px) {
    .footer-bottom {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 8px 10px;
    }
}

.copyright {
    text-align: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 0.8em;
}

/* Responsive */
@media (max-width: 1024px) {
    .upload-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .upload-grid .upload-section:nth-child(3) {
        grid-column: span 2;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .actions-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-icon {
        font-size: 1.8em;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

/* Message spécifique pour le loading */
.upload-loading {
    background: #e0f7ff !important;
    border-color: #3498db !important;
}

.upload-loading .upload-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles pour les messages flash */
.flash-messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash-message {
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
    word-wrap: break-word;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border-left: 4px solid #219653;
}

.flash-error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-left: 4px solid #a93226;
}

.flash-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border-left: 4px solid #d35400;
}

.flash-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-left: 4px solid #21618c;
}

.flash-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.flash-text {
    flex-grow: 1;
    font-size: 0.95em;
    line-height: 1.4;
}

.flash-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.flash-close:hover {
    opacity: 1;
}