/* ============================================================
   PORTFOLIO — FATIMA EZZOHRA DADI — style.css partagé
   ============================================================ */

/* ===== VARIABLES ===== */
:root {
    --accent: #ff2d75;
    --accent-glow: rgba(255, 45, 117, 0.45);
    --accent2: #bc13fe;
    --dark-bg: #050508;
    --dark-card: #0d0d14;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-bg-hover: rgba(255, 45, 117, 0.06);
    --border: rgba(255, 45, 117, 0.22);
    --border-hover: rgba(255, 45, 117, 0.65);
    --grad: linear-gradient(135deg, #ff2d75, #bc13fe);
    --grad-text: linear-gradient(90deg, #ff2d75, #bc13fe);
    --text-muted: rgba(255, 255, 255, 0.55);
    --text-body: rgba(255, 255, 255, 0.87);
    --nav-width: 290px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--dark-bg);
    color: var(--text-body);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    line-height: 1.7;
}

/* ===== SCROLL PROGRESS ===== */
#scroll-progress {
    position: fixed; top: 0; left: 0;
    width: 0%; height: 3px;
    background: var(--grad);
    z-index: 9999;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ===== CURSEUR ===== */
@media (min-width: 992px) {
    * { cursor: none !important; }
    #cursor-dot {
        width: 8px; height: 8px;
        background: var(--accent);
        position: fixed; border-radius: 50%;
        pointer-events: none; z-index: 10000;
        transform: translate(-50%, -50%);
        box-shadow: 0 0 10px var(--accent-glow);
    }
    #cursor-outline {
        width: 40px; height: 40px;
        border: 2px solid rgba(255, 45, 117, 0.45);
        position: fixed; border-radius: 50%;
        pointer-events: none; z-index: 9999;
        transform: translate(-50%, -50%);
        transition: 0.12s ease-out;
    }
}

/* ===== BACK TO TOP ===== */
#back-to-top {
    position: fixed; bottom: 28px; right: 28px;
    width: 48px; height: 48px;
    background: var(--grad);
    border: none; border-radius: 50%;
    color: #fff; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    z-index: 9000; opacity: 0; pointer-events: none;
    transition: 0.4s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
    text-decoration: none;
}
#back-to-top.visible { opacity: 1; pointer-events: all; }
#back-to-top:hover { transform: translateY(-5px); box-shadow: 0 10px 30px var(--accent-glow); }

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(5, 5, 8, 0.88) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    z-index: 1000;
    transition: 0.3s ease;
}
.navbar.scrolled {
    background: rgba(5, 5, 8, 0.97) !important;
    box-shadow: 0 4px 30px rgba(255, 45, 117, 0.08);
}
.navbar-brand img { height: 60px; border-radius: 40%; transition: 0.3s; }
.navbar-brand img:hover { transform: scale(1.06); }

.navbar-toggler { border: none; color: var(--accent); padding: 0; }
.navbar-toggler:focus { box-shadow: none; outline: none; }

.navbar-collapse {
    position: fixed; top: 0; right: -100%; width: var(--nav-width); height: 100vh;
    background: rgba(5, 5, 8, 0.99);
    transition: 0.42s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    padding: 75px 28px 28px;
    border-left: 1px solid var(--border);
    display: block !important;
    overflow-y: auto;
}
.navbar-collapse.show { right: 0; box-shadow: -10px 0 60px rgba(0,0,0,0.85); }

.nav-link {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.72rem;
    margin-bottom: 6px;
    transition: 0.3s;
    color: rgba(255,255,255,0.65) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 9px 13px !important;
    border-radius: 9px;
    display: flex; align-items: center; gap: 9px;
}
.nav-link .nav-icon { font-size: 0.85rem; width: 16px; text-align: center; opacity: 0.6; }
.nav-link:hover, .nav-link.active {
    color: var(--accent) !important;
    background: rgba(255, 45, 117, 0.09);
}
.nav-link.active { color: var(--accent) !important; }

.nav-page-label {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 6px 13px 4px;
    margin-top: 6px;
}

/* ===== UTILITAIRES ===== */
.text-accent { color: var(--accent) !important; }
.text-grad {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.bg-grad { background: var(--grad); }

/* ===== PAGE HERO (intérieur pages) ===== */
.page-hero {
    min-height: 38vh;
    display: flex; align-items: flex-end;
    padding: 120px 0 60px;
    background: linear-gradient(180deg, rgba(5,5,8,0) 0%, var(--dark-bg) 100%),
                radial-gradient(ellipse at 70% 30%, rgba(255, 45, 117, 0.1) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(188, 19, 254, 0.07) 0%, transparent 50%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.page-hero::before {
    content: attr(data-title);
    position: absolute;
    right: -2rem; bottom: -1rem;
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(4rem, 14vw, 10rem);
    font-weight: 700;
    color: rgba(255, 45, 117, 0.04);
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: -2px;
}
.page-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 45, 117, 0.1);
    border: 1px solid rgba(255, 45, 117, 0.28);
    color: var(--accent);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-family: 'Syncopate', sans-serif;
}
.page-hero-title {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 18px;
}
.page-hero-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 520px;
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(1rem, 3.5vw, 1.6rem);
    text-align: center;
    margin: 80px 0 45px;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
}
.section-title span {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-title::after {
    content: '';
    display: block;
    width: 55px; height: 3px;
    background: var(--grad);
    border-radius: 2px;
    margin: 12px auto 0;
    box-shadow: 0 0 12px var(--accent-glow);
}
.section-title.left-align { text-align: left; }
.section-title.left-align::after { margin-left: 0; }

/* ===== CARDS ===== */
.content-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    height: 100%;
    transition: 0.4s ease;
    display: flex; flex-direction: column;
    position: relative;
    overflow: hidden;
}
.content-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--grad);
    opacity: 0; transition: 0.4s;
}
.content-card:hover {
    transform: translateY(-7px);
    border-color: rgba(255, 45, 117, 0.45);
    box-shadow: 0 16px 45px rgba(0,0,0,0.45), 0 0 30px rgba(255,45,117,0.09);
    background: var(--card-bg-hover);
}
.content-card:hover::before { opacity: 1; }

/* Card static (pas de hover lift) */
.card-static:hover { transform: none; }

/* ===== MEDIA BOX ===== */
.media-box {
    width: 100%; height: 190px;
    border-radius: 12px; overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.35);
    flex-shrink: 0;
}
.media-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s ease; }
.content-card:hover .media-box img { transform: scale(1.07); }
.doc-box { height: 220px; }

/* ===== TIMELINE BADGE ===== */
.timeline-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 45, 117, 0.1);
    border: 1px solid rgba(255, 45, 117, 0.28);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    width: fit-content;
}

/* ===== SKILL CARDS ===== */
.skill-card { padding: 26px !important; }
.skill-icon {
    font-size: 2rem; margin-bottom: 14px;
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tags span {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-body);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    transition: 0.3s;
}
.skill-card:hover .skill-tags span {
    border-color: rgba(255, 45, 117, 0.38);
    background: rgba(255, 45, 117, 0.05);
}
.skill-card:hover { background: rgba(255, 45, 117, 0.04) !important; }
.lang-tag {
    font-weight: 600;
    color: var(--accent) !important;
    border-color: rgba(255, 45, 117, 0.38) !important;
    background: rgba(255, 45, 117, 0.07) !important;
}

/* ===== BOUTONS ===== */
.btn-creative {
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid var(--accent);
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    transition: 0.3s;
    background: transparent;
    font-size: 0.83rem;
    letter-spacing: 0.5px;
    position: relative; overflow: hidden;
    font-family: 'Space Grotesk', sans-serif;
}
.btn-creative::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--grad);
    opacity: 0; transition: 0.3s;
    z-index: 0;
}
.btn-creative:hover {
    box-shadow: 0 0 22px var(--accent-glow), 0 4px 15px rgba(0,0,0,0.3);
    transform: translateY(-2px);
    border-color: transparent;
}
.btn-creative:hover::before { opacity: 1; }
.btn-creative > * { position: relative; z-index: 1; }
.btn-ghost {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.03);
}
.btn-ghost:hover::before { opacity: 0; }
.btn-ghost:hover {
    border-color: var(--accent);
    background: rgba(255, 45, 117, 0.08);
    box-shadow: none;
    transform: translateY(-2px);
}

/* ===== FORMULAIRE ===== */
.form-control-custom {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    padding: 13px 16px;
    width: 100%;
    margin-bottom: 14px;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: 0.3s;
}
.form-control-custom:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 0 3px rgba(255, 45, 117, 0.1);
}
.form-control-custom::placeholder { color: rgba(255,255,255,0.3); }

/* ===== CONTACT INFO CARD ===== */
.contact-info-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 22px;
    transition: 0.3s;
    text-decoration: none;
    color: var(--text-body);
}
.contact-info-card:hover {
    border-color: rgba(255,45,117,0.45);
    background: var(--card-bg-hover);
    transform: translateX(6px);
    color: #fff;
}
.contact-info-card .icon {
    width: 46px; height: 46px;
    background: rgba(255, 45, 117, 0.1);
    border: 1px solid rgba(255, 45, 117, 0.28);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 1.1rem;
    flex-shrink: 0;
}

/* ===== SOCIAL ICONS ===== */
.social-icons { display: flex; gap: 12px; flex-wrap: wrap; }
.social-icons a {
    width: 46px; height: 46px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.65);
    font-size: 1.1rem;
    transition: 0.4s;
    text-decoration: none;
}
.social-icons a:hover {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 22px var(--accent-glow);
}

/* ===== FOOTER ===== */
.footer-section {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 65px 0 22px;
    margin-top: 90px;
}
.footer-title {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.footer-links, .footer-contact-list { list-style: none; padding: 0; }
.footer-links li, .footer-contact-list li { margin-bottom: 9px; font-size: 0.88rem; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    display: inline-flex; align-items: center; gap: 6px;
}
.footer-links a:hover { color: var(--accent); padding-left: 5px; }
.footer-contact-list i { width: 20px; color: var(--accent); margin-right: 6px; }
.footer-contact-list a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.footer-contact-list a:hover { color: var(--accent); }
.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    opacity: 0.42;
    font-size: 0.78rem;
}

/* ===== FILTRE PROJETS ===== */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 7px 18px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ===== PROJECT CARD ===== */
.project-card { transition: 0.5s ease; }
.project-card.hidden { opacity: 0; transform: scale(0.9); pointer-events: none; height: 0; overflow: hidden; margin: 0 !important; padding: 0 !important; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.project-tag {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
}

/* ===== TIMELINE (Parcours) ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(255,45,117,0.1) 100%);
    border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-item::before {
    content: '';
    position: absolute; left: -34px; top: 6px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    border: 2px solid var(--dark-bg);
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px;
    transition: 0.35s;
}
.timeline-card:hover {
    border-color: rgba(255, 45, 117, 0.42);
    background: var(--card-bg-hover);
    transform: translateX(5px);
}
.timeline-date {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.timeline-company {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.timeline-desc { font-size: 0.88rem; color: var(--text-body); }
.timeline-logo {
    width: 48px; height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.3);
    flex-shrink: 0;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
    transition: 0.35s;
}
.stat-card:hover {
    border-color: rgba(255,45,117,0.4);
    background: var(--card-bg-hover);
    transform: translateY(-5px);
}
.stat-number {
    font-family: 'Syncopate', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label { font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .page-hero { min-height: auto; padding: 105px 0 50px; }
    .page-hero::before { font-size: 4rem; opacity: 0.5; }
}
@media (max-width: 768px) {
    .section-title { margin: 65px 0 35px; }
    .content-card { padding: 16px; }
    .media-box { height: 170px; }
    .footer-section { text-align: center; }
    .social-icons { justify-content: center; }
    .contact-info-card:hover { transform: translateY(-4px); }
    .skill-card { text-align: center; }
    .skill-tags { justify-content: center !important; }
    #back-to-top { bottom: 18px; right: 18px; width: 44px; height: 44px; }
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switcher {
    display: flex;
    gap: 6px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.3s ease;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lang-btn span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.75;
}

.lang-btn:hover {
    border-color: var(--accent);
    background: rgba(255, 45, 117, 0.15);
    transform: translateY(-2px);
}

.lang-btn.active {
    border-color: var(--accent);
    background: rgba(255, 45, 117, 0.18);
    box-shadow: 0 0 12px rgba(255, 45, 117, 0.25);
}

.lang-btn.active span { opacity: 1; }

/* ============================================================
   RTL SUPPORT (Arabic)
   ============================================================ */
[dir="rtl"] body { font-family: 'Space Grotesk', 'Segoe UI', Tahoma, sans-serif; }

[dir="rtl"] .navbar-nav { text-align: right; }
[dir="rtl"] .nav-icon   { margin-right: 0; margin-left: 6px; }

[dir="rtl"] .hero-social,
[dir="rtl"] .d-flex:not(.lang-switcher):not(.exp-tags):not(.tools-grid):not(.proj-footer) { }

[dir="rtl"] .exp-card::before  { left: auto; right: 0; }
[dir="rtl"] .exp-card:hover    { transform: translateX(-6px); }

[dir="rtl"] .cert-card::after  { right: auto; left: 0; }
[dir="rtl"] .cert-card:hover   { transform: translateX(5px); }

[dir="rtl"] .formation-timeline::before { left: auto; right: 20px; }
[dir="rtl"] .formation-step            { padding-left: 0; padding-right: 10px; flex-direction: row-reverse; }
[dir="rtl"] .formation-step-content:hover { transform: translateX(-5px); }

[dir="rtl"] .section-divider::after {
    background: linear-gradient(270deg, var(--border), transparent);
}

[dir="rtl"] .nav-page-card .arrow { flex-direction: row-reverse; }
[dir="rtl"] .nav-page-card .arrow i { transform: scaleX(-1); }

[dir="rtl"] .page-hero { direction: rtl; }

[dir="rtl"] .proj-footer { direction: ltr; }

[dir="rtl"] .footer-contact-list li {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

[dir="rtl"] .lang-switcher { direction: ltr; }

[dir="rtl"] #scroll-progress { left: auto; right: 0; }

[dir="rtl"] .type-badge { right: auto; left: 18px; }

@media (max-width: 576px) {
    [dir="rtl"] .type-badge { left: auto; position: static; }
}
