/*
==============================================
IANA-DATA.ORG - CUSTOM CSS FOR JA BLOCKK
==============================================
Auteur: Design moderne Tech/IA optimisé JA Blockk
Version: 2.0 - FIX SCROLL ISSUE
Date: Février 2026
Template: JA Blockk (T4 Framework - JoomlArt)

🔧 FIX CRITIQUE: Corrige le problème de scroll sur pages articles

INSTALLATION:
1. Joomla Admin → Extensions → Templates → JA Blockk
2. Onglet "Editor" → Créer fichier: css/custom.css
3. Copier-coller tout ce code
4. Sauvegarder et vider cache

PALETTE:
- Bleu: #0EA5E9 (Principal)
- Violet: #8B5CF6 (Innovation)
- Vert: #10B981 (Data)
- Orange: #F97316 (News)
- Rouge: #EF4444 (Éthique)
==============================================
*/

/* =========================================
   FIX CRITIQUE: PROBLÈME DE SCROLL
========================================= */

/* CORRECTION: Empêcher overflow:hidden sur body/html dans articles */
html,
body {
    overflow-x: hidden !important;
    overflow-y: auto !important; /* ESSENTIEL: permet le scroll vertical */
    height: auto !important;
    min-height: 100vh !important;
}

/* Assurer que le wrapper principal ne bloque pas le scroll */
#t4-wrapper,
.t4-wrapper,
#t4-content,
.t4-content,
.container-fluid,
.container {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
}

/* Articles: Autoriser défilement */
.blog-item,
.item-page,
.t4-content article,
article.item {
    overflow: visible !important;
    height: auto !important;
}

/* Reset position fixed qui pourrait bloquer */
body.item-page {
    position: static !important;
}


/* =========================================
   SECTION 1: TYPOGRAPHIE GOOGLE FONTS
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Application globale */
body,
html,
.t4-content,
.item-page {
    font-family: 'Inter', Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 16px;
    line-height: 1.6;
    color: #1E293B;
}

/* Titres */
h1, h2, h3, h4, h5, h6,
.page-title,
.article-title,
.item-title,
.blog-item h3,
.blog-item h2 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.02em;
}

h1, .h1 { font-size: 2.5rem; font-weight: 800; }
h2, .h2 { font-size: 2rem; font-weight: 700; }
h3, .h3 { font-size: 1.5rem; font-weight: 600; }
h4, .h4 { font-size: 1.25rem; font-weight: 600; }


/* =========================================
   SECTION 2: COULEURS DE MARQUE
========================================= */

/* Liens */
a {
    color: #0EA5E9;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0284C7;
    text-decoration: none;
}

/* Menu principal T4 */
.t4-navbar .navbar-nav > li > a,
.t4-megamenu .nav-link,
.navbar-nav .nav-link {
    color: #1E293B !important;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.t4-navbar .navbar-nav > li > a:hover,
.t4-megamenu .nav-link:hover,
.navbar-nav .nav-link:hover {
    color: #0EA5E9 !important;
}

/* Animation soulignement menu */
.t4-navbar .navbar-nav > li > a::after,
.t4-megamenu .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0EA5E9, #8B5CF6);
    transition: width 0.3s ease;
}

.t4-navbar .navbar-nav > li > a:hover::after,
.t4-megamenu .nav-link:hover::after {
    width: 100%;
}


/* =========================================
   SECTION 3: HEADER & NAVIGATION
========================================= */

/* Header principal */
.t4-header,
.t4-navbar,
#t4-header {
    background: #FFFFFF;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* Logo */
.logo img,
.t4-logo img {
    transition: transform 0.3s ease;
}

.logo:hover img,
.t4-logo:hover img {
    transform: scale(1.05);
}


/* =========================================
   SECTION 4: CATÉGORIES COLORÉES
========================================= */

/* Tags/Badges catégories */
.category-name,
.item-category,
.blog-item .item-category a,
.content-category,
span.category-name {
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    margin-bottom: 12px !important;
    transition: all 0.3s ease !important;
}

/* Fondamentaux - Bleu */
.category-fondamentaux,
a[href*="fondamentaux"] .category-name,
a[href*="fondamentaux"] .item-category {
    background-color: #0EA5E9 !important;
    color: #FFFFFF !important;
}

.category-fondamentaux:hover {
    background-color: #0284C7 !important;
    transform: translateY(-2px);
}

/* Outils & Tech - Violet */
.category-outils,
.category-tech,
a[href*="outils"] .category-name,
a[href*="technologies"] .category-name,
a[href*="tech"] .item-category {
    background-color: #8B5CF6 !important;
    color: #FFFFFF !important;
}

/* Applications - Vert */
.category-applications,
a[href*="applications"] .category-name,
a[href*="applications"] .item-category {
    background-color: #10B981 !important;
    color: #FFFFFF !important;
}

/* AI News / Actualités - Orange */
.category-news,
.category-actualites,
a[href*="actualites"] .category-name,
a[href*="ai-news"] .category-name,
a[href*="news"] .item-category {
    background-color: #F97316 !important;
    color: #FFFFFF !important;
}

/* Éthique - Rouge */
.category-ethique,
a[href*="ethique"] .category-name,
a[href*="ethique"] .item-category {
    background-color: #EF4444 !important;
    color: #FFFFFF !important;
}

/* Blog générique - Bleu par défaut */
.blog .item-category,
.blog-category {
    background-color: #0EA5E9 !important;
    color: #FFFFFF !important;
}


/* =========================================
   SECTION 5: CARTES D'ARTICLES
========================================= */

/* Style général cartes */
.blog-item,
.item-page article,
.t4-item,
.acm-article,
article.item {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    position: relative;
    margin-bottom: 30px;
}

/* Hover effect */
.blog-item:hover,
.t4-item:hover,
.acm-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #0EA5E9;
}

/* Border gauche colorée */
.blog-item::before,
.t4-item::before,
.acm-article::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #0EA5E9, #8B5CF6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-item:hover::before,
.t4-item:hover::before,
.acm-article:hover::before {
    opacity: 1;
}

/* Images articles */
.blog-item img,
.item-image img,
.acm-article img,
.intro-image img {
    transition: transform 0.4s ease;
    width: 100%;
    height: auto;
}

.blog-item:hover img,
.t4-item:hover img,
.acm-article:hover img {
    transform: scale(1.05);
}

/* Container image avec overflow */
.blog-item .item-image,
.t4-item-image,
.intro-image {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}


/* =========================================
   SECTION 6: BOUTONS & CTA
========================================= */

/* Boutons principaux */
.btn,
.button,
.btn-primary,
.readmore,
.read-more,
button,
input[type="submit"] {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    text-decoration: none !important;
    display: inline-block;
}

.btn:hover,
.button:hover,
.btn-primary:hover,
.readmore:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4) !important;
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
    color: #FFFFFF !important;
}

/* Boutons secondaires */
.btn-secondary,
.btn-outline {
    background: transparent !important;
    border: 2px solid #0EA5E9 !important;
    color: #0EA5E9 !important;
    box-shadow: none !important;
}

.btn-secondary:hover,
.btn-outline:hover {
    background: #0EA5E9 !important;
    color: #FFFFFF !important;
}


/* =========================================
   SECTION 7: BADGES & INDICATEURS
========================================= */

/* Badge "Nouveau" */
.badge-new,
.new-article,
.label-new {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Badge "Populaire" */
.badge-popular,
.label-popular {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #FFFFFF;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}


/* =========================================
   SECTION 8: PAGE ARTICLE COMPLÈTE
========================================= */

/* Container article */
.item-page {
    background: #FFFFFF;
    padding: 40px 20px;
    margin: 20px auto;
    max-width: 100%;
}

/* Titre article */
.item-page .page-header h1,
.item-page .article-title,
.item-page h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Info article (auteur, date) */
.article-info,
.item-info,
.content-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E2E8F0;
    font-size: 0.9rem;
    color: #64748B;
}

.article-info dd,
.item-info dd {
    margin: 0;
}

/* Contenu article */
.item-page .item-content,
.article-content,
.item-fulltext {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.item-page p {
    margin-bottom: 1.5rem;
}

/* Images dans contenu */
.item-page img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}


/* =========================================
   SECTION 9: FORMULAIRES
========================================= */

input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select,
.form-control {
    border: 2px solid #E2E8F0 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-family: 'Inter', sans-serif !important;
    transition: border-color 0.3s ease;
    width: 100%;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    border-color: #0EA5E9 !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1) !important;
}


/* =========================================
   SECTION 10: FOOTER
========================================= */

.t4-footer,
#t4-footer,
footer {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #E2E8F0;
    padding: 40px 20px;
    margin-top: 60px;
}

/* Titres et sous-menus footer */
.t4-footer h3,
.t4-footer h4,
.t4-footer .module-title,
#t4-footer h3,
#t4-footer h4,
#t4-footer .module-title,
footer h3,
footer h4,
footer .module-title {
    color: #F1F5F9 !important;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Texte général footer */
.t4-footer p,
.t4-footer li,
.t4-footer span,
#t4-footer p,
#t4-footer li,
#t4-footer span,
footer p,
footer li,
footer span {
    color: #CBD5E1 !important;
}

/* Liens footer - Couleur éclaircis */
.t4-footer a,
#t4-footer a,
footer a {
    color: #E2E8F0 !important;
    transition: color 0.3s ease;
    font-weight: 500;
}

.t4-footer a:hover,
#t4-footer a:hover,
footer a:hover {
    color: #0EA5E9 !important;
    text-decoration: none;
}

/* Sous-menus footer (nav-menu) */
.t4-footer ul.nav,
.t4-footer ul.menu,
.t4-footer .nav-menu,
#t4-footer ul.nav,
#t4-footer ul.menu,
#t4-footer .nav-menu,
footer ul.nav,
footer ul.menu,
footer .nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.t4-footer ul.nav li,
.t4-footer ul.menu li,
#t4-footer ul.nav li,
#t4-footer ul.menu li,
footer ul.nav li,
footer ul.menu li {
    margin-bottom: 10px;
}

.t4-footer ul.nav li a,
.t4-footer ul.menu li a,
#t4-footer ul.nav li a,
#t4-footer ul.menu li a,
footer ul.nav li a,
footer ul.menu li a {
    color: #E2E8F0 !important;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    padding: 6px 0;
}

.t4-footer ul.nav li a:hover,
.t4-footer ul.menu li a:hover,
#t4-footer ul.nav li a:hover,
#t4-footer ul.menu li a:hover,
footer ul.nav li a:hover,
footer ul.menu li a:hover {
    color: #0EA5E9 !important;
    padding-left: 8px;
    transition: padding-left 0.3s ease;
}

/* Copyright footer */
.t4-footer .copyright,
#t4-footer .copyright,
footer .copyright {
    color: #94A3B8 !important;
    font-size: 0.875rem;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.1);
}


/* =========================================
   SECTION 11: BACKGROUNDS ALTERNÉS
========================================= */

.section-alternate,
.bg-light,
.t4-section-light {
    background: linear-gradient(135deg, #F1F5F9 0%, #E0E7FF 100%);
    padding: 60px 20px;
}

/* Pattern tech */
.section-tech-pattern {
    background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
    background-size: 20px 20px;
}


/* =========================================
   SECTION 12: PAGINATION
========================================= */

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 40px 0;
}

.pagination .page-link,
.pagination a {
    padding: 10px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 6px;
    color: #1E293B;
    transition: all 0.3s ease;
}

.pagination .page-link:hover,
.pagination a:hover {
    background: #0EA5E9;
    color: #FFFFFF;
    border-color: #0EA5E9;
}

.pagination .active .page-link {
    background: #0EA5E9;
    color: #FFFFFF;
    border-color: #0EA5E9;
}


/* =========================================
   SECTION 13: RESPONSIVE
========================================= */

/* Mobile (< 768px) */
@media (max-width: 767px) {
    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }
    
    .btn,
    .button {
        font-size: 0.875rem !important;
        padding: 10px 20px !important;
    }
    
    .item-page .page-header h1 {
        font-size: 1.75rem;
    }
    
    .article-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Tablette (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
}


/* =========================================
   SECTION 14: UTILITAIRES
========================================= */

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #0EA5E9, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ombres */
.shadow-xl {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

/* Borders colorées */
.border-primary { border-color: #0EA5E9 !important; }
.border-purple { border-color: #8B5CF6 !important; }
.border-green { border-color: #10B981 !important; }


/* =========================================
   SECTION 15: ANIMATIONS
========================================= */

/* Fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}


/* =========================================
   SECTION 16: CORRECTIONS SPÉCIFIQUES T4
========================================= */

/* Off-canvas menu */
.t4-off-canvas {
    z-index: 9999;
}

/* Megamenu */
.t4-megamenu .dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Breadcrumb */
.t4-breadcrumb,
.breadcrumb {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #64748B;
    padding: 0 8px;
}

.breadcrumb-item a {
    color: #64748B;
}

.breadcrumb-item.active {
    color: #0EA5E9;
    font-weight: 600;
}


/* =========================================
   FIN DU FICHIER CSS
========================================= */

/*
VÉRIFICATION POST-INSTALLATION:
1. ✅ Vider cache Joomla
2. ✅ Vider cache navigateur (Ctrl+Shift+R)
3. ✅ Tester page accueil
4. ✅ Tester page article (scroll doit fonctionner!)
5. ✅ Tester page catégorie
6. ✅ Tester sur mobile

PROBLÈME DE SCROLL RÉSOLU ✅
- overflow-y: auto sur html/body
- overflow: visible sur containers
- height: auto sur articles
- position: static sur body.item-page

Si le scroll ne fonctionne toujours pas:
1. Ouvrir DevTools (F12)
2. Onglet "Elements"
3. Chercher body ou html
4. Vérifier dans "Styles" si un autre CSS surcharge
5. Ajouter !important si nécessaire

SUPPORT:
- Documentation T4: https://www.t4-page-builder.com/
- Forum JoomlArt: https://www.joomlart.com/forums
*/
