/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7eaba2;
    --primary-light: #4895ef;
    --primary-dark: #3a0ca3;
    --secondary-color: #f72585;
    --accent-color: #4cc9f0;
    --text-light: #F8FAFC;
    --bg-gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    --card-gradient: linear-gradient(to bottom right, #ffffff, #f0f4ff);
    --border-radius: 12px;
    --box-shadow: 0 8px 20px rgba(67, 97, 238, 0.2);
    --box-shadow-hover: 0 15px 30px rgba(167, 181, 245, 0.3);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #4a4b4f;
    background-color: #ecf5ff;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* En-tête 
.site-header {
    background: var(--bg-gradient);
    color: var(--text-light);
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: fadeInDown 0.8s ease-out;
}
    */

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--text-light);
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
    transition: var(--transition);
}

.logo:hover img {
    transform: rotate(10deg);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
}


.main-nav li {
    position: relative;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a:hover {
    background: rgba(237, 229, 229, 0.509);
    transform: translateY(-2px);
}

.main-nav a i {
    font-size: 1.1rem;
}

/* Bouton spécial "Déposer" */
.nav-deposit {
    background: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
    margin: 0 1rem;
    animation: pulse 2s infinite;
}

.nav-deposit:hover {
    background: #e5177e;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(247, 37, 133, 0.4);
}

/* Boutons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 2px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.btn:hover::before {
    left: 100%;
}

.btn-light {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-light:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: var(--secondary-color);
}

.btn-danger:hover {
    background: #d1146d;
}

.btn-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

/* Cartes */
.card {
    background: var(--card-gradient);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    transform: translateY(0);
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.card-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Hero section */

.hero {
    background: var(--bg-gradient);
    color: var(--text-light);
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}


.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../../assets/images/pattern.jpg') repeat;
    opacity: 0.9;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.search-bar input {
    width: 100%;
    padding: 1.2rem;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    padding-right: 60px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.3);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button:hover {
    background: #e5177e;
    transform: rotate(15deg);
}

/* Features section */
.features {
    padding: 4rem 0;
    background: white;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.feature-title {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(247, 37, 133, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(247, 37, 133, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(247, 37, 133, 0);
    }
}

/* Ajoutez le reste de votre CSS existant ici avec les nouvelles améliorations */
/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
}


/* Styles pour les sections dynamiques de documents */
.doc-section {
    margin: 2.2rem 0;
    padding: 1rem 0;
    background: transparent;
}
.doc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.doc-section-header h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin: 0;
}
.doc-section-header .see-all {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    background: rgba(67,97,238,0.06);
    padding: 6px 10px;
    border-radius: 999px;
    transition: var(--transition);
}
.doc-section-header .see-all:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.doc-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(34,41,47,0.06);
    border: 1px solid rgba(20,20,40,0.04);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.doc-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 18px 40px rgba(34,41,47,0.10);
}
.doc-card .doc-card-img {
    height: 160px;
    width: 100%;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.doc-card .doc-card-img img,
.doc-card .doc-card-img canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.doc-card .doc-card-body {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.doc-card .doc-title {
    font-size: 0.98rem;
    color: var(--primary-dark);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.doc-card .doc-sub {
    font-size: 0.84rem;
    color: #6b7280;
}
.doc-card .doc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}
.doc-card .doc-meta .counts {
    display:flex; gap:0.8rem; color:#6b7280; font-size:0.88rem; align-items:center;
}
.doc-card .doc-actions {
    display:flex; gap:0.6rem; align-items:center;
}
.doc-card .doc-actions button,
.doc-card .doc-actions a {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.18s ease, transform 0.18s ease;
}
.doc-card .doc-actions button:hover,
.doc-card .doc-actions a:hover { background: rgba(67,97,238,0.06); transform: translateY(-2px); }
.doc-card .doc-actions .btn-primary {
    background:#f0f4ff; color:var(--primary-dark); padding:6px 8px; border-radius:8px; text-decoration:none;
}
.doc-card .favorite.active { color:#ff6b6b; }
.doc-card .like.active { color:#4361ee; }

@media (max-width: 600px) {
    .doc-card .doc-card-img { height: 130px; }
    .doc-grid { grid-template-columns: repeat(2, 1fr); }
}

/* small util */
.muted { color:#8b8f95; font-size:0.85rem; }
    
    .main-nav li {
        margin: 0.5rem 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
/* Profil */
/* Profil */
.profile-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.profile-sidebar {
    flex: 0 0 250px;
}

.profile-content {
    flex: 1;
}

.profile-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-menu ul {
    list-style: none;
}

.profile-menu li {
    margin-bottom: 0.5rem;
}

.profile-menu a {
    display: block;
    padding: 0.8rem 1rem;
    background: white;
    border-radius: var(--border-radius);
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.profile-menu a:hover {
    background: #f0f0f0;
}

.profile-menu a i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.profile-menu .active a {
    background: var(--primary-color);
    color: white;
}

.profile-info {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.info-group {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.info-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-group label {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.stat-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.document-thumbnail {
    height: 180px;
    overflow: hidden;
}

.document-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.document-info {
    padding: 1.2rem;
}

.document-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.document-stats {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-light {
    background: #f0f0f0;
    color: #333;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}
/* Document view */
.document-view {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.document-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: var(--border-radius);
}

.document-description {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: var(--border-radius);
}

.document-description h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.document-preview {
    margin-top: 2rem;
}

.document-preview h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* PDF.js viewer */
.pdf-viewer-container {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    overflow: hidden;
}
/* Ajouter à la fin de assets/css/style.css */

/* Animations supplémentaires */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Effet de ripple pour les boutons */
.btn .ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* Animation de chargement */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation pour les cartes */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: cardEntrance 0.6s ease-out;
    animation-fill-mode: backwards;
}

/* Délais d'animation pour les cartes */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* Effet de hover sur les cartes de document */
.document-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Transition pour les éléments du formulaire */
.form-control, .btn, .card, .document-card, .feature-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Style pour les messages flash */
.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1100;
    animation: slideInRight 0.5s ease-out, fadeOut 0.5s ease-out 4.5s forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.flash-info {
    background: #cce5ff;
    color: #004085;
    border-left: 4px solid #007bff;
}