/* =================================================================== */
/* === 1. CONFIGURATION GLOBALE ET VARIABLES ========================= */
/* =================================================================== */
:root {
    scroll-behavior: smooth;
    --background: #0f172a;
    --surface: #1e293b;
    --border: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-primary: #4f46e5;
    --accent-secondary: #a5b4fc;
    --ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1);
}

body {
    background-color: var(--background);
    background-image: radial-gradient(circle, rgba(30, 41, 59, 0.5) 0%, transparent 60%);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 40px;
    box-sizing: border-box;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* =================================================================== */
/* === 2. ÉCRAN DE DÉMARRAGE (SPLASH SCREEN) [RESPONSIVE] ============= */
/* =================================================================== */
#splash-screen {
    position: fixed; top: 0; left: 0;
    width: 100%;
    height: 100%;
    height: 100svh; /* Assure la compatibilité avec les barres de navigation mobiles */
    background-color: #0c1322;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s var(--ease-out-cubic), visibility 0.8s;
    box-sizing: border-box;
    padding: 1rem;
}
#splash-screen.fade-out { opacity: 0; visibility: hidden; }

.logo-animator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 4vh, 1.5rem); /* Espacement fluide */
}
.logo-icon-wrapper {
    width: clamp(80px, 20vw, 100px); /* Taille fluide */
    height: clamp(80px, 20vw, 100px); /* Taille fluide */
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    display: flex; justify-content: center; align-items: center; border-radius: 50%;
    -webkit-animation: pulseGlow 4s infinite ease-in-out, scaleIn 1s var(--ease-out-cubic) forwards;
    animation: pulseGlow 4s infinite ease-in-out, scaleIn 1s var(--ease-out-cubic) forwards;
}
.logo-icon {
    font-size: clamp(40px, 10vw, 50px); /* Taille de police fluide */
    color: #fff; text-shadow: 0 0 15px #fff; opacity: 0;
    -webkit-animation: iconFadeIn 1s 0.5s var(--ease-out-cubic) forwards;
    animation: iconFadeIn 1s 0.5s var(--ease-out-cubic) forwards;
}
.logo-text {
    display: flex;
    font-size: clamp(1.8rem, 8vw, 2.5rem); /* Taille de police fluide */
    font-weight: 600;
    text-align: center;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}
.logo-text span {
    opacity: 0;
    -webkit-transform: translateY(20px); transform: translateY(20px);
    -webkit-animation: letterFadeUp 0.5s var(--ease-out-cubic) forwards;
    animation: letterFadeUp 0.5s var(--ease-out-cubic) forwards;
}
.logo-text span:nth-child(1) { animation-delay: 0.8s; } .logo-text span:nth-child(2) { animation-delay: 0.85s; } .logo-text span:nth-child(3) { animation-delay: 0.9s; } .logo-text span:nth-child(4) { animation-delay: 0.95s; } .logo-text span:nth-child(5) { animation-delay: 1s; } .logo-text span:nth-child(6) { animation-delay: 1.05s; } .logo-text span:nth-child(7) { animation-delay: 1.1s; } .logo-text span:nth-child(8) { animation-delay: 1.15s; } .logo-text span:nth-child(9) { animation-delay: 1.2s; } .logo-text span:nth-child(10) { animation-delay: 1.25s; } .logo-text span:nth-child(11) { animation-delay: 1.3s; } .logo-text span:nth-child(12) { animation-delay: 1.35s; }
.logo-subtitle {
    font-size: clamp(0.8rem, 3vw, 1rem); /* Taille de police fluide */
    color: var(--text-secondary); letter-spacing: 2px; text-transform: uppercase; opacity: 0;
    -webkit-animation: subtitleFadeIn 1s 1.8s ease forwards; animation: subtitleFadeIn 1s 1.8s ease forwards;
}
@-webkit-keyframes scaleIn { from { -webkit-transform: scale(0.5); opacity: 0; } to { -webkit-transform: scale(1); opacity: 1; } } @keyframes scaleIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@-webkit-keyframes iconFadeIn { from { opacity: 0; -webkit-transform: rotate(-90deg) scale(0); } to { opacity: 1; -webkit-transform: rotate(0deg) scale(1); } } @keyframes iconFadeIn { from { opacity: 0; transform: rotate(-90deg) scale(0); } to { opacity: 1; transform: rotate(0deg) scale(1); } }
@-webkit-keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 20px 5px rgba(79, 70, 229, 0.2); } 50% { box-shadow: 0 0 40px 10px rgba(79, 70, 229, 0.5); } } @keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 20px 5px rgba(79, 70, 229, 0.2); } 50% { box-shadow: 0 0 40px 10px rgba(79, 70, 229, 0.5); } }
@-webkit-keyframes letterFadeUp { from { opacity: 0; -webkit-transform: translateY(20px); } to { opacity: 1; -webkit-transform: translateY(0); } } @keyframes letterFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@-webkit-keyframes subtitleFadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes subtitleFadeIn { from { opacity: 0; } to { opacity: 1; } }


/* =================================================================== */
/* === 3. COMPOSANTS COMMUNS (HEADER, FOOTER, BTN) =================== */
/* =================================================================== */
#page-content.hidden { visibility: hidden; opacity: 0; }
.main-header { max-width: 1200px; margin: 0 auto 60px auto; display: flex; justify-content: space-between; align-items: center; animation: fadeIn 1s 0.5s ease backwards; }
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo-container h1 { font-size: 24px; font-weight: bold; }
.btn { padding: 14px 28px; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s var(--ease-out-cubic); display: inline-block; border: none; }
.btn:hover { transform: translateY(-3px); }
.btn-primary { background-image: linear-gradient(to right, #4f46e5 0%, #6366f1 100%); color: #ffffff; box-shadow: 0 4px 15px -5px rgba(79, 70, 229, 0.6); }
.btn-primary:hover { box-shadow: 0 6px 20px -5px rgba(79, 70, 229, 0.8); }
.main-footer { max-width: 1200px; margin: 80px auto 0 auto; text-align: center; padding-top: 40px; border-top: 1px solid var(--surface); color: var(--text-secondary); }
.footer-links a { color: var(--text-secondary); margin: 0 10px; transition: color 0.2s ease; }
.footer-links a:hover { text-decoration: underline; color: var(--text-primary); }
.footer-links span { color: #475569; margin: 0 5px; }


/* =================================================================== */
/* === 4A. STYLES SPÉCIFIQUES (ACCUEIL) ============================== */
/* =================================================================== */
.intro-container { text-align: center; max-width: 700px; margin: 60px auto 80px auto; }
.welcome-title { font-size: 48px; font-weight: 600; margin-bottom: 20px; line-height: 1.2; opacity: 0; animation: fadeInUp 0.8s 0.6s var(--ease-out-cubic) forwards; text-shadow: 0 2px 20px rgba(79, 70, 229, 0.2); }
.welcome-text { font-size: 18px; color: var(--text-secondary); line-height: 1.7; opacity: 0; animation: fadeInUp 0.8s 0.8s var(--ease-out-cubic) forwards; }
.actions-container { text-align: center; margin-top: 40px; }
.featured-container { display: flex; justify-content: center; }
.article-card { background-color: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; transition: transform 0.3s var(--ease-out-cubic), box-shadow 0.3s var(--ease-out-cubic), border-color 0.3s ease; max-width: 550px; width: 100%; }
.article-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.2), 0 8px 15px -8px rgba(79, 70, 229, 0.5); border-color: var(--accent-primary); }
.card-category { font-size: 12px; font-weight: 600; color: var(--accent-primary); text-transform: uppercase; margin-bottom: 10px; }
.card-title { font-size: 22px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.card-description { font-size: 16px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 25px; }
.card-link { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent-secondary); display: flex; align-items: center; }
.card-link .material-icons { font-size: 18px; margin-left: 5px; transition: transform 0.2s ease; }
.article-card:hover .card-link .material-icons { transform: translateX(3px); }
.reviews-section { padding-top: 60px; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 32px; font-weight: 600; margin-bottom: 40px; }
.reviews-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; }
.review-card { background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); max-width: 320px; width: 100%; display: flex; flex-direction: column; transition: transform 0.3s var(--ease-out-cubic), box-shadow 0.3s var(--ease-out-cubic); }
.review-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.review-header { display: flex; align-items: center; margin-bottom: 16px; gap: 15px; }
.profile-icon { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(145deg, #4f46e5, #6366f1); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: #ffffff; position: relative; flex-shrink: 0; }
.google-logo { width: 20px; height: 20px; position: absolute; bottom: 0; right: 0; background-color: white; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.3); background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="%234285F4" d="M24 9.5c3.34 0 5.61 1.48 6.83 2.76l5.73-5.73C32.12 3.86 28.52 2 24 2 15.65 2 8.78 6.95 5.25 14.1l6.73 5.23C13.82 13.06 18.51 9.5 24 9.5z"/><path fill="%2334A853" d="M46.73 24c0-1.58-.15-3.13-.42-4.63H24v8.78h12.56c-.66 4.35-3.17 7.9-7.05 10.25l6.72 5.23c3.9-6.38 6.16-14.07 6.16-22.63z"/><path fill="%23FBBC05" d="M24 44c6.64 0 12.27-2.19 16.36-5.94l-6.72-5.23c-2.3 1.54-5.24 2.45-8.64 2.45-5.5 0-10.19-3.56-11.83-8.4L5.25 33.9C8.78 41.05 15.65 46 24 46z"/><path fill="%23EA4335" d="M4.68 14.1L11.4 19.33c-1.3-3.23-2.03-6.85-2.03-10.51 0-1.12.1-2.22.28-3.27L4.68 6.1C3.33 8.36 2.4 11.05 2.4 14.1z"/></svg>'); background-size: 15px; background-repeat: no-repeat; background-position: center; }
.review-name { font-weight: 600; font-size: 1.1em; display: flex; align-items: center; gap: 6px; }
.certif-badge { color: #42a5f5; font-size: 1.1em; }
.review-source { font-size: 0.85em; color: var(--text-secondary); }
.review-rating { display: flex; margin-bottom: 12px; color: #ffd700; }
.review-rating .material-icons { font-size: 20px; }
.review-card p { color: var(--text-secondary); line-height: 1.6; flex-grow: 1; }

/* =================================================================== */
/* === 4B. STYLES SPÉCIFIQUES (TUTORIELS) ============================ */
/* =================================================================== */
.library-header { text-align: center; max-width: 700px; margin: 60px auto 40px auto; }
.library-title { font-size: 48px; font-weight: 600; margin-bottom: 15px; }
.library-subtitle { font-size: 18px; color: var(--text-secondary); line-height: 1.7; }
.search-container { position: relative; max-width: 600px; margin: 0 auto 60px auto; }
.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
#search-input { width: 100%; padding: 18px 25px 18px 60px; font-size: 16px; font-family: 'Inter', sans-serif; color: var(--text-primary); background-color: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: all 0.3s ease; box-sizing: border-box; }
#search-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.3); }
#search-input::placeholder { color: var(--text-secondary); }
.articles-library-container { max-width: 1200px; margin: 0 auto; transition: opacity 0.2s ease-in-out; }
.articles-library-container.is-filtering { opacity: 0; }
.category-section { margin-bottom: 50px; }
.category-title { font-size: 24px; font-weight: 600; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid var(--surface); display: flex; align-items: center; gap: 12px; }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 25px; }
.tuto-card { background-color: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-decoration: none; display: flex; align-items: flex-start; gap: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.tuto-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(79, 70, 229, 0.4); border-color: var(--accent-primary); }
.tuto-card-icon-wrapper { flex-shrink: 0; width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background-color: rgba(79, 70, 229, 0.1); }
.tuto-card-icon-wrapper .material-icons { color: var(--accent-secondary); font-size: 28px; }
.tuto-card-content { display: flex; flex-direction: column; }
.tuto-card-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0 0 5px 0; }
.tuto-card-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.no-results-message { text-align: center; color: var(--text-secondary); font-size: 18px; padding: 50px 20px; }

/* =================================================================== */
/* === 5. ANIMATIONS ET RESPONSIVE DESIGN ============================ */
/* =================================================================== */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease-out-cubic), transform 0.8s var(--ease-out-cubic); }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .welcome-title, .library-title { font-size: 38px; }
}

@media (max-width: 600px) {
    body { padding: 20px; }
    .main-header { flex-direction: column; gap: 20px; margin-bottom: 30px; }
    .logo-container h1 { font-size: 20px; }
    .intro-container, .library-header { margin: 20px auto 40px auto; }
    .welcome-title, .library-title { font-size: 32px; }
    .welcome-text, .library-subtitle { font-size: 16px; }
    .footer-links { display: flex; flex-direction: column; gap: 10px; }
    .footer-links span { display: none; }
}

/* CORRECTION FINALE POUR LES PETITS ÉCRANS */
@media (max-width: 360px) {
    .logo-text {
        font-size: clamp(1.5rem, 9vw, 1.8rem); /* Taille encore plus réduite pour les écrans très étroits */
    }
    body {
        padding: 15px; /* Moins de marge sur les côtés */
    }
}