/* ========================================
   HOME.CSS - Styles modernes pour la page d'accueil
   ======================================== */

/* ===== VARIABLES CSS MODERNES ===== */
:root {
    /* Palette de couleurs moderne (inspirée de GitHub/VSCode) */
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #3b82f6;
    --color-secondary: #64748b;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #06b6d4;
    
    /* Neutres modernes */
    --color-white: #ffffff;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #657ff0 0%, #0d6efd 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #0d6efd 50%, #f093fb 100%);
    --gradient-text: linear-gradient(135deg, #667eea 0%, #0d6efd 100%);
    
    /* Espacement moderne */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border radius moderne */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Ombres modernes */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions modernes */
    --transition-fast: all 0.15s ease;
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    --transition-bounce: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* ===== STYLES GÉNÉRAUX ===== */
.min-vh-80 {
    min-height: 80vh;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 0px;
    padding-bottom: 0px;
    background: var(--color-gray-50);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: var(--space-xs) 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-2xl);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-xl);
    color: var(--color-gray-900);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-animation 3s ease infinite;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-gray-600);
    margin-bottom: var(--space-2xl);
    max-width: 500px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
    animation: fadeInUp 0.8s ease 0.6s both;
    flex-direction: row; /* Force horizontal sur desktop */
}

.btn-hero {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: var(--transition-bounce);
    border: 2px solid;
    min-width: 200px;
    flex-shrink: 0;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    animation: fadeInUp 0.8s ease 0.8s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-gray-300);
}

/* ===== HERO VISUAL ===== */
.hero-visual {
    position: relative;
    z-index: 2;
    height: 500px;
    animation: fadeIn 1s ease 1s both;
    padding: var(--space-xs) 0;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-lg);
    min-width: 280px;
    transition: var(--transition-bounce);
    cursor: pointer;
}

.floating-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: var(--shadow-2xl);
}

.floating-card.card-1 {
    top: 5%;
    left: 5%;
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-2 {
    top: 25%;
    right: 5%;
    animation: float 6s ease-in-out infinite 2s;
}

.floating-card.card-3 {
    bottom: 30%;
    left: 15%;
    animation: float 6s ease-in-out infinite 4s;
}

.floating-card.card-4 {
    top: 60%;
    right: 20%;
    animation: float 6s ease-in-out infinite 1s;
}

.floating-card.card-5 {
    bottom: 5%;
    right: 10%;
    animation: float 6s ease-in-out infinite 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.card-header i {
    font-size: 1.5rem;
}

.card-header span {
    font-weight: 600;
    color: var(--color-gray-800);
}

.card-body-mini {
    margin-bottom: var(--space-md);
}

.card-desc {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    margin: 0;
    line-height: 1.3;
}

.card-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--color-gray-500);
    align-items: center;
}

.card-level {
    background: var(--color-success);
    color: var(--color-white);
    padding: 2px var(--space-xs);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* ===== SECTIONS COMMUNES ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-gray-900);
    margin-bottom: var(--space-lg);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--color-gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== RECENT SECTION ===== */
.recent-section {
    padding: var(--space-3xl) 0;
    background: var(--color-gray-50);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.document-card-modern {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition-bounce);
    overflow: hidden;
    height: 100%;
}

.document-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-lg) 0;
}

.document-type i {
    font-size: 1.5rem;
}

.document-size {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    background: var(--color-gray-100);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
}

.document-body {
    padding: var(--space-lg);
}

.document-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.document-description {
    color: var(--color-gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--space-lg);
}

.document-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

.document-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-top: 1px solid var(--color-gray-100);
    background: var(--color-gray-50);
}

.document-stats {
    display: flex;
    gap: var(--space-lg);
}

.stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

.btn-white {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-white);
}

.btn-white:hover {
    background: var(--color-gray-100);
    color: var(--color-primary);
    border-color: var(--color-gray-100);
}

.btn-outline-white {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline-white:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===== RESPONSIVE ===== */

/* Grands écrans et tablettes */
@media (max-width: 1200px) {
    .hero-actions {
        gap: var(--space-md);
    }
    
    .btn-hero {
        min-width: 180px;
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.95rem;
    }
}

/* Tablettes */
@media (max-width: 992px) {
    .hero-actions {
        gap: var(--space-md);
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        flex-direction: row;
    }
    
    .btn-hero {
        min-width: 160px;
        flex: 1;
        max-width: 250px;
    }
}

/* Tablettes moyennes - garde horizontal */
@media (max-width: 768px) {
    .hero-actions {
        gap: var(--space-md);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-hero {
        min-width: 140px;
        flex: 0 1 auto;
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: auto;
        padding: var(--space-2xl) 0;
    }
    
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stat-divider {
        display: none;
    }
    
    .hero-visual {
        height: 300px;
        margin-top: var(--space-xs);
    }
    
    .floating-card {
        min-width: 180px;
        padding: var(--space-sm);
        font-size: 0.8rem;
    }
    
    .floating-card.card-4,
    .floating-card.card-5 {
        display: none; /* Masquer les cartes supplémentaires sur mobile */
    }
    
    .section-header {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
        max-width: 100%;
    }
    
    .btn-hero,
    .btn-white,
    .btn-outline-white {
        width: 100%;
        max-width: 280px;
        min-width: auto;
        flex: none;
    }
}

/* Très petits mobiles */
@media (max-width: 400px) {
    .hero-actions {
        gap: var(--space-sm);
        padding: 0 var(--space-md);
    }
    
    .btn-hero {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
        max-width: 100%;
    }
}

/* ===== RECENT DOCUMENTS SECTION ===== */
.recent-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.header-content {
    flex: 1;
}

.section-title-modern {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin: 0;
}

/* ===== DOCUMENTS GRID FOR HOME ===== */
.documents-grid-home {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 1rem 0;
}

/* Responsive pour mobile - 1 carte par ligne sur petits écrans */
@media (max-width: 768px) {
    .documents-grid-home {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
}

.document-grid-item {
    transition: transform 0.3s ease;
}

.document-grid-item:hover {
    transform: translateY(-4px);
}

/* Responsive grid adjustments */
@media (max-width: 1200px) {
    .documents-grid-home {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .documents-grid-home {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .documents-grid-home {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .section-subtitle{
        display: none;
    }
}

/* ===== DOCUMENT CARD STYLES FOR HOME ===== */
/* Styles spécifiques pour l'intégration sur la page d'accueil */
/* Le composant document_card a maintenant son propre CSS */

.document-grid-item {
    /* Ajustements spécifiques pour la grille sur home */
    transition: transform 0.3s ease;
}

.document-grid-item:hover {
    transform: translateY(-4px);
}
