/* ═══════════════════════════════════════════════════════
   FIVEHOSTING - CSS PRINCIPAL
   Design system : dark mode, glass morphism, animations
   ═══════════════════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --bg: #050508;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.06);
    --text: #f8fafc;
    --text-muted: #64748b;
    --glass-blur: blur(12px);
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.7); }

/* Sélection */
::selection { background: rgba(99, 102, 241, 0.35); color: #fff; }

/* ─── Typographie ─── */
.font-display { font-family: 'Syne', sans-serif; }

/* ─── Glass Morphism ─── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
}

.glass-dark {
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
}

/* ─── Gradient Text ─── */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Boutons ─── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4); transform: translateY(-1px); }
.btn-primary > * { position: relative; z-index: 1; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* ─── Badges ─── */
.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 9999px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.tech-badge-lg {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ─── Input Fields ─── */
.input-field {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}
.input-field::placeholder { color: #475569; }
.input-field:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
select.input-field option { background: #0d0d14; color: #fff; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 6px;
}

/* ─── Ambient Orbs ─── */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: drift 20s ease-in-out infinite;
}
.orb-1 {
    width: 600px; height: 600px;
    top: -20%;  left: -10%;
    background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 70%);
    animation-duration: 25s;
}
.orb-2 {
    width: 500px; height: 500px;
    bottom: -10%; right: -5%;
    background: radial-gradient(circle, rgba(139,92,246,0.1), transparent 70%);
    animation-duration: 30s;
    animation-delay: -10s;
}
.orb-3 {
    width: 400px; height: 400px;
    top: 40%; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(245,158,11,0.06), transparent 70%);
    animation-duration: 35s;
    animation-delay: -5s;
}

/* ─── Grid Pattern ─── */
.grid-pattern {
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ─── Noise Overlay ─── */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ─── Navbar ─── */
.nav-link {
    position: relative;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.2s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.navbar-glass {
    background: rgba(5, 5, 8, 0.0);
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.navbar-glass.scrolled {
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ─── Cards Portfolio ─── */
.project-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
}

/* ─── Pagination ─── */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.pagination-btn:hover, .pagination-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #fff;
}
.pagination-btn.active { font-weight: 700; }

/* ─── Category Filter ─── */
.category-filter-btn {
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
}
.category-filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}
.category-filter-btn.active {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* ─── Skill Bars ─── */
.skill-bar {
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Flash Messages ─── */
.flash-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.4s ease;
    position: relative;
    overflow: hidden;
}
.flash-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }
.flash-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.25);  color: #fca5a5; }
.flash-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); color: #fcd34d; }
.flash-info    { background: rgba(99,102,241,0.1);  border: 1px solid rgba(99,102,241,0.25); color: #a5b4fc; }

/* ─── Floating Badges ─── */
.floating-badge {
    animation: floatBadge 4s ease-in-out infinite;
}

/* ─── Social Icons ─── */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    transition: all 0.3s ease;
}
.social-icon:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

/* ─── Line Clamp ─── */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── Reveal Animations ─── */
.reveal-section, .reveal-item {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-section.visible, .reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Admin Styles ─── */
.admin-card {
    background: rgba(13, 13, 20, 0.9);
}

.admin-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 9px 14px;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-input::placeholder { color: #475569; }
.admin-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
select.admin-input option { background: #0d0d14; }
textarea.admin-input { min-height: 80px; }

.admin-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.admin-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-admin-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.btn-admin-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.admin-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.875rem;
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.admin-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.admin-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.admin-btn-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ─── Prose Legal ─── */
.prose-legal { color: #94a3b8; font-size: 0.95rem; line-height: 1.8; }
.prose-legal h2 { font-family: 'Syne', sans-serif; font-size: 1.35rem; font-weight: 700; color: #fff; margin: 2rem 0 0.75rem; }
.prose-legal p { margin-bottom: 1rem; }
.prose-legal ul { list-style: none; padding: 0; margin-bottom: 1rem; }
.prose-legal ul li { padding: 4px 0 4px 20px; position: relative; }
.prose-legal ul li::before { content: '›'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.prose-legal a { color: var(--primary); text-decoration: none; }
.prose-legal a:hover { text-decoration: underline; }
.prose-legal strong { color: #e2e8f0; font-weight: 600; }
.prose-legal table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.prose-legal th, .prose-legal td { text-align: left; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 0.875rem; }
.prose-legal th { color: #e2e8f0; font-weight: 600; background: rgba(255,255,255,0.03); }

/* ─── Cookie Banner ─── */
#cookie-banner { transition: transform 0.4s ease, opacity 0.4s ease; }
#cookie-banner.hidden { transform: translateY(100%); opacity: 0; pointer-events: none; }

/* ─── Animations ─── */
@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -20px) scale(1.05); }
    66%       { transform: translate(-20px, 30px) scale(0.95); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-14px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

@keyframes floatBadge {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-8px) rotate(1deg); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.animate-fade-in { animation: fadeIn 0.8s ease both; }

@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
.animate-pulse-slow { animation: pulse-slow 2.5s ease-in-out infinite; }

/* ─── Back to top ─── */
#back-to-top {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s ease;
}
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* ─── Mobile Menu ─── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}
#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}
