@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* =========================================
   VARIABLES
   ========================================= */
:root {
    --white:      #ffffff;
    --off-white:  #f0f4ff;
    --blue:       #0057ff;
    --blue-light: #4d8bff;
    --blue-dim:   rgba(0, 87, 255, 0.12);
    --blue-glow:  rgba(0, 87, 255, 0.25);
    --ink:        #0b0f1a;
    --ink-mid:    #3d4460;
    --ink-soft:   #8892b0;
    --glass-bg:   rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 8px 32px rgba(0, 87, 255, 0.10), 0 2px 8px rgba(0,0,0,0.06);
    --glass-hover:  0 16px 48px rgba(0, 87, 255, 0.18), 0 4px 16px rgba(0,0,0,0.08);
    --radius:     16px;
    --radius-sm:  8px;
    --tr:         0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --fs:         'Playfair Display', Georgia, serif;
    --fb:         'DM Sans', system-ui, sans-serif;
}

/* =========================================
   RESET
   ========================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--fb);
    background: var(--off-white);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Gradient mesh background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 10%, rgba(0,87,255,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 90%, rgba(77,139,255,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(240,244,255,1) 0%, rgba(220,230,255,0.4) 100%);
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4 {
    font-family: var(--fs);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink);
}
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; font-family: var(--fb); }

p, a, li, label, input, button, select, textarea {
    font-family: var(--fb);
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--ink-mid);
}

a { color: var(--blue); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--blue-light); }

/* =========================================
   GLASS MIXIN (utility)
   ========================================= */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* =========================================
   LAYOUT
   ========================================= */
.container {
    flex-grow: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* =========================================
   HEADER
   ========================================= */
.mm-header {
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border-bottom: 1px solid rgba(0, 87, 255, 0.12);
    box-shadow: 0 2px 20px rgba(0, 87, 255, 0.07);
}

.header-titre h1 {
    font-family: var(--fs);
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.header-titre h1 span {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--blue);
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    box-shadow: 0 0 8px var(--blue);
}

/* Nav desktop */
.header-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; }
.header-nav a {
    display: block;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-mid);
    border-radius: var(--radius-sm);
    transition: background var(--tr), color var(--tr);
}
.header-nav a:hover {
    background: var(--blue-dim);
    color: var(--blue);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px; height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 200;
}
.hamburger span {
    display: block;
    width: 100%; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 68px 0 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 99;
    flex-direction: column;
    padding: 40px 32px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.mobile-nav-overlay.open { transform: none; opacity: 1; }
.mobile-nav-overlay ul { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-overlay a {
    display: block;
    color: var(--ink);
    font-family: var(--fs);
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    font-weight: 700;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,87,255,0.1);
    transition: color var(--tr), padding-left var(--tr);
    letter-spacing: -0.02em;
}
.mobile-nav-overlay a:hover { color: var(--blue); padding-left: 10px; }

@media (max-width: 768px) {
    .header-nav { display: none; }
    .hamburger, .mobile-nav-overlay { display: flex; }
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid rgba(0,87,255,0.1);
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.site-footer p, .footer-tag {
    font-size: 0.72rem;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
}
.footer-tag {
    background: var(--blue-dim);
    color: var(--blue);
    padding: 4px 12px;
    border-radius: 99px;
    font-weight: 600;
}

/* =========================================
   TAG PILL
   ========================================= */
.tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 12px;
    background: var(--blue-dim);
    color: var(--blue);
    border-radius: 99px;
    border: 1px solid rgba(0,87,255,0.2);
}

/* =========================================
   ACCUEIL
   ========================================= */
.main-menu-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeUp 0.55s cubic-bezier(0.4,0,0.2,1) both;
}

.block-banner {
    padding: 52px 48px;
    background: linear-gradient(135deg, rgba(0,87,255,0.92) 0%, rgba(30,60,220,0.96) 100%);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,87,255,0.3), 0 4px 16px rgba(0,0,0,0.1);
}

.block-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.block-banner::after {
    content: 'INDEX';
    position: absolute;
    right: -20px; bottom: -30px;
    font-family: var(--fs);
    font-size: 10rem;
    font-weight: 900;
    color: rgba(255,255,255,0.05);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.04em;
}

.block-banner h2 {
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    color: white;
    position: relative;
    z-index: 1;
    max-width: 560px;
    line-height: 1.2;
    font-style: italic;
}
.block-banner h2 span {
    color: rgba(255,255,255,0.75);
    font-style: normal;
    display: block;
    font-size: 0.7em;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: var(--fb);
}

.block-sub-content {
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--glass-shadow);
}
.block-sub-content::before {
    content: '◆';
    font-size: 0.5rem;
    color: var(--blue);
}
.block-sub-content p {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-mid);
    letter-spacing: 0.02em;
}

.block-main-display {
    padding: 40px 44px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tuto-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0,87,255,0.1);
}
.tuto-header h3 {
    font-size: 1.15rem;
    color: var(--ink);
}

.tuto-steps { display: flex; flex-direction: column; gap: 20px; }

.tuto-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    transition: background var(--tr);
}
.tuto-step:hover { background: var(--blue-dim); }

.step-num {
    font-family: var(--fs);
    font-size: 1.6rem;
    font-weight: 900;
    color: rgba(0,87,255,0.2);
    min-width: 36px;
    line-height: 1;
    transition: color var(--tr);
}
.tuto-step:hover .step-num { color: var(--blue); }
.step-content strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
    font-family: var(--fb);
}
.step-content p { font-size: 0.8rem; color: var(--ink-soft); }
.step-content a { color: var(--blue); font-weight: 500; }
.step-content a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .block-banner { padding: 36px 28px; }
    .block-main-display { padding: 28px 24px; }
}

/* =========================================
   PROMOTIONS (projets.php)
   ========================================= */
.index-coding-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeUp 0.5s ease both;
}

.page-title { margin-bottom: 8px; }
.page-title h2 { font-style: italic; }

.layers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.layer-item-link { text-decoration: none; display: block; }

.layer-item {
    padding: 28px 36px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow var(--tr), transform var(--tr), border-color var(--tr);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.layer-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,87,255,0) 0%, rgba(0,87,255,0.04) 100%);
    opacity: 0;
    transition: opacity var(--tr);
    pointer-events: none;
}

.layer-item:hover {
    box-shadow: var(--glass-hover);
    transform: translateY(-2px);
    border-color: rgba(0,87,255,0.25);
}
.layer-item:hover::before { opacity: 1; }

.layer-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.layer-num {
    font-family: var(--fs);
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(0,87,255,0.15);
    line-height: 1;
    min-width: 56px;
    transition: color var(--tr);
}
.layer-item:hover .layer-num { color: var(--blue); }

.layer-item h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    transition: color var(--tr);
}
.layer-item:hover h3 { color: var(--blue); }

.layer-arrow {
    font-size: 1.3rem;
    color: var(--ink-soft);
    transition: transform var(--tr), color var(--tr);
}
.layer-item:hover .layer-arrow { transform: translateX(4px); color: var(--blue); }

/* =========================================
   PROJETS DETAILS (details-projets.php)
   ========================================= */
.enfants-projets-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeUp 0.5s ease both;
}

.projets-header-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-soft);
    width: fit-content;
    padding: 6px 0;
    transition: color var(--tr);
}
.btn-back:hover { color: var(--blue); }

.promo-meta {
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.projets-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.projet-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow var(--tr), transform var(--tr), border-color var(--tr);
}
.projet-card:hover {
    box-shadow: var(--glass-hover);
    transform: translateY(-3px);
    border-color: rgba(0,87,255,0.25);
}

.card-header {
    padding: 22px 22px 14px;
    background: linear-gradient(135deg, rgba(0,87,255,0.06) 0%, rgba(0,87,255,0.02) 100%);
    border-bottom: 1px solid rgba(0,87,255,0.08);
}
.card-header h4 {
    font-family: var(--fs);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin: 6px 0 4px;
    line-height: 1.2;
}
.corner-tag {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    background: var(--blue-dim);
    color: var(--blue);
    border-radius: 4px;
}
.projet-author {
    font-size: 0.75rem;
    color: var(--ink-soft);
    margin-top: 2px;
}
.projet-author span { color: var(--blue); font-weight: 500; }

.card-body {
    padding: 14px 22px;
    flex: 1;
}
.mini-dscr {
    font-size: 0.8rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

.card-footer-tags {
    padding: 12px 22px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mini-tech-tag {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 10px;
    background: rgba(0,87,255,0.07);
    color: var(--blue);
    border-radius: 99px;
    border: 1px solid rgba(0,87,255,0.15);
    letter-spacing: 0.03em;
}
.more-tags {
    background: var(--blue-dim);
    opacity: 0.7;
}

/* Empty state */
.empty-projects-state {
    text-align: center;
    padding: 64px 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.empty-icon { font-size: 3rem; }
.empty-projects-state h3 { font-size: 1.2rem; color: var(--ink); }
.empty-projects-state p { font-size: 0.82rem; color: var(--ink-soft); max-width: 320px; }
.btn-add-action {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--blue);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background var(--tr), box-shadow var(--tr);
    box-shadow: 0 4px 16px rgba(0,87,255,0.3);
}
.btn-add-action:hover {
    background: var(--blue-light);
    box-shadow: 0 8px 24px rgba(0,87,255,0.4);
    color: white;
}

/* =========================================
   AUTH PAGES
   ========================================= */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    animation: fadeUp 0.5s ease both;
}
.single-auth { justify-content: center; }

.auth-box {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-box h2 {
    font-size: 1.8rem;
    font-style: italic;
    color: var(--ink);
}

.auth-redirect {
    font-size: 0.8rem;
    color: var(--ink-soft);
    text-align: center;
}
.auth-redirect a { color: var(--blue); font-weight: 500; }

/* =========================================
   FORMS
   ========================================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.form-group:last-of-type { margin-bottom: 0; }

label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-mid);
    letter-spacing: 0.03em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 11px 16px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,87,255,0.15);
    border-radius: var(--radius-sm);
    font-family: var(--fb);
    font-size: 0.88rem;
    color: var(--ink);
    outline: none;
    transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}
input::placeholder, textarea::placeholder { color: var(--ink-soft); }

input:focus, select:focus, textarea:focus {
    border-color: var(--blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(0,87,255,0.12);
}

select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238892b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

button[type="submit"], .auth-box button[type="submit"] {
    width: 100%;
    padding: 13px 24px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--fb);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--tr), box-shadow var(--tr), transform var(--tr);
    box-shadow: 0 4px 16px rgba(0,87,255,0.3);
    letter-spacing: 0.02em;
}
button[type="submit"]:hover {
    background: #0047d4;
    box-shadow: 0 8px 24px rgba(0,87,255,0.4);
    transform: translateY(-1px);
}
button[type="submit"]:active { transform: translateY(0); }

/* =========================================
   PROFIL
   ========================================= */
.profil-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
    animation: fadeUp 0.5s ease both;
}

.profil-sidebar {
    background: linear-gradient(160deg, rgba(0,87,255,0.88) 0%, rgba(0,40,180,0.95) 100%);
    border-radius: var(--radius);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    position: sticky;
    top: 88px;
    box-shadow: 0 16px 48px rgba(0,87,255,0.28);
}

.profil-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fs);
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
    backdrop-filter: blur(8px);
}

.profil-sidebar h2 { font-size: 1.1rem; color: white; margin-bottom: 2px; font-style: italic; }
.profil-role {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.profil-sidebar-info {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profil-sidebar-info p { font-size: 0.72rem; color: rgba(255,255,255,0.55); word-break: break-all; }
.profil-sidebar-info span { color: white; font-weight: 600; display: block; }

.profil-main {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profil-section {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(0,87,255,0.08);
}
.profil-section:last-child { border-bottom: none; }

.section-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    margin-bottom: 14px;
}

.redirections-links { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.redirections-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(0,87,255,0.04);
    border: 1px solid rgba(0,87,255,0.1);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-mid);
    transition: background var(--tr), border-color var(--tr), color var(--tr);
}
.redirections-links a::after { content: '→'; color: var(--blue); }
.redirections-links a:hover {
    background: var(--blue-dim);
    border-color: rgba(0,87,255,0.25);
    color: var(--blue);
}

/* Boutons d'action profil */
.btn-edit, .btn-add-projet {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--fb);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--tr), box-shadow var(--tr), transform var(--tr);
    border: none;
}
.btn-edit {
    background: rgba(0,87,255,0.07);
    color: var(--blue);
    border: 1px solid rgba(0,87,255,0.2);
}
.btn-edit:hover {
    background: var(--blue-dim);
    box-shadow: 0 4px 12px rgba(0,87,255,0.15);
    transform: translateY(-1px);
}
.btn-add-projet {
    background: var(--blue);
    color: white;
    box-shadow: 0 4px 14px rgba(0,87,255,0.28);
}
.btn-add-projet:hover {
    background: #0047d4;
    box-shadow: 0 8px 20px rgba(0,87,255,0.35);
    transform: translateY(-1px);
}

/* Panel slide-down */
.panel-toggle {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.42s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.panel-toggle.open { max-height: 700px; opacity: 1; }

.panel-inner {
    background: rgba(240, 244, 255, 0.8);
    border: 1px solid rgba(0,87,255,0.1);
    border-radius: var(--radius-sm);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}
.panel-inner .form-group { margin-bottom: 0; }
.panel-btn-row { display: flex; gap: 8px; }

.btn-save {
    flex: 1;
    background: var(--blue);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--fb);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--tr), box-shadow var(--tr);
    box-shadow: 0 4px 14px rgba(0,87,255,0.28);
}
.btn-save:hover { background: #0047d4; }

.btn-cancel {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid rgba(0,87,255,0.15);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--fb);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background var(--tr), color var(--tr);
}
.btn-cancel:hover { background: rgba(0,87,255,0.06); color: var(--ink); }

.projets-list { display: flex; flex-direction: column; gap: 6px; }
.projet-item {
    border: 1px solid rgba(0,87,255,0.1);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255,255,255,0.7);
    transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
}
.projet-item:hover {
    border-color: rgba(0,87,255,0.3);
    background: var(--blue-dim);
    box-shadow: 0 4px 12px rgba(0,87,255,0.1);
}
.projet-item h4 { font-size: 0.84rem; color: var(--ink); }
.projet-item .pi-meta { font-size: 0.7rem; color: var(--ink-soft); }
.projet-item .pi-meta a { color: var(--blue); }

.empty-state {
    padding: 32px 24px;
    border: 1px dashed rgba(0,87,255,0.2);
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.8rem;
    background: rgba(0,87,255,0.03);
}

@media (max-width: 700px) {
    .profil-container { grid-template-columns: 1fr; }
    .profil-sidebar { position: static; }
}

/* =========================================
   PREVIEW PANEL (slide-in)
   ========================================= */
.preview-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 26, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.preview-backdrop.open { opacity: 1; pointer-events: all; }

.preview-panel {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(480px, 100vw);
    background: rgba(248, 250, 255, 0.9);
    backdrop-filter: blur(32px) saturate(1.8);
    -webkit-backdrop-filter: blur(32px) saturate(1.8);
    border-left: 1px solid rgba(0,87,255,0.15);
    box-shadow: -8px 0 48px rgba(0,87,255,0.12);
    z-index: 400;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.preview-panel.open { transform: none; }

.preview-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(0,87,255,0.1);
    position: sticky;
    top: 0;
    background: rgba(248, 250, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1;
}
.preview-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0,87,255,0.2);
    background: rgba(0,87,255,0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--ink-mid);
    transition: background var(--tr), color var(--tr), border-color var(--tr);
}
.preview-close:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

.preview-img-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    border-bottom: 1px solid rgba(0,87,255,0.08);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,87,255,0.08) 0%, rgba(0,87,255,0.03) 100%);
    flex-shrink: 0;
}
.preview-img-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fs);
    font-size: 4rem;
    font-weight: 900;
    color: rgba(0,87,255,0.2);
    letter-spacing: -0.04em;
    user-select: none;
    font-style: italic;
}

.preview-body { padding: 28px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.preview-title {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    font-style: italic;
    color: var(--ink);
}

.preview-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,87,255,0.08);
}
.preview-meta-item { display: flex; flex-direction: column; gap: 3px; }
.preview-meta-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    font-weight: 600;
}
.preview-meta-value { font-size: 0.82rem; font-weight: 600; color: var(--ink); }

.preview-description {
    font-size: 0.84rem;
    line-height: 1.75;
    color: var(--ink-mid);
}

.preview-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 5px 12px;
    background: rgba(0,87,255,0.07);
    color: var(--blue);
    border-radius: 99px;
    border: 1px solid rgba(0,87,255,0.15);
}

.preview-footer {
    padding: 20px 28px;
    border-top: 1px solid rgba(0,87,255,0.1);
    position: sticky;
    bottom: 0;
    background: rgba(248, 250, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.btn-voir-projet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 22px;
    background: var(--blue);
    color: white;
    border-radius: var(--radius-sm);
    font-family: var(--fb);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--tr), box-shadow var(--tr), transform var(--tr);
    box-shadow: 0 6px 20px rgba(0,87,255,0.32);
}
.btn-voir-projet:hover {
    background: #0047d4;
    box-shadow: 0 10px 28px rgba(0,87,255,0.4);
    transform: translateY(-1px);
    color: white;
}
.btn-voir-projet .arrow { font-size: 1.1rem; transition: transform var(--tr); }
.btn-voir-projet:hover .arrow { transform: translateX(4px); }

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   FILE DROP ZONE
   ========================================= */
.form-hint {
    font-size: 0.68rem;
    color: var(--ink-soft);
    font-weight: 400;
    margin-left: 6px;
}

.file-drop-zone {
    position: relative;
    border: 2px dashed rgba(0,87,255,0.25);
    border-radius: var(--radius-sm);
    padding: 24px 16px;
    cursor: pointer;
    background: rgba(0,87,255,0.03);
    transition: border-color var(--tr), background var(--tr);
    overflow: hidden;
}
.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: var(--blue);
    background: var(--blue-dim);
}

.file-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}
.file-drop-icon { font-size: 1.8rem; }
.file-drop-text {
    font-size: 0.78rem;
    color: var(--ink-soft);
    text-align: center;
}
.file-drop-text u { color: var(--blue); text-underline-offset: 2px; }

.file-drop-preview img {
    margin-top: 8px;
    max-height: 120px;
    max-width: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid rgba(0,87,255,0.15);
    display: block;
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* =========================================
   COLLABORATOR PICKER
   ========================================= */
.collab-picker {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.collab-search {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(0,87,255,0.18);
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-family: var(--fb);
    color: var(--ink);
    outline: none;
    transition: border-color var(--tr), box-shadow var(--tr);
}
.collab-search:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,87,255,0.12);
}

.collab-dropdown {
    display: none;
    position: absolute;
    top: 44px;
    left: 0; right: 0;
    background: white;
    border: 1px solid rgba(0,87,255,0.18);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0,87,255,0.15);
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
}
.collab-dropdown.open { display: block; }

.collab-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--tr);
    border-bottom: 1px solid rgba(0,87,255,0.06);
}
.collab-dropdown-item:last-child { border-bottom: none; }
.collab-dropdown-item:hover { background: var(--blue-dim); }

.collab-dd-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}
.collab-dd-promo {
    font-size: 0.7rem;
    color: var(--ink-soft);
}

.collab-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 8px;
}

.collab-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 12px;
    background: var(--blue-dim);
    color: var(--blue);
    border: 1px solid rgba(0,87,255,0.22);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}
.collab-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--blue);
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    opacity: 0.6;
    transition: opacity var(--tr);
}
.collab-remove:hover { opacity: 1; }

/* =========================================
   MANAGE PROJECTS (profil.php)
   ========================================= */
.manage-projets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.manage-projet-item {
    border: 1px solid rgba(0,87,255,0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255,255,255,0.6);
    transition: border-color var(--tr);
}
.manage-projet-item:hover { border-color: rgba(0,87,255,0.22); }

.manage-projet-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
}

.manage-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(0,87,255,0.1);
}
.manage-thumb-placeholder {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0,87,255,0.12) 0%, rgba(0,87,255,0.06) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fs);
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue);
    font-style: italic;
}

.manage-projet-info { flex: 1; min-width: 0; }
.manage-projet-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.manage-projet-info .pi-meta { font-size: 0.7rem; color: var(--ink-soft); }

.manage-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-manage-edit,
.btn-manage-delete {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background var(--tr), color var(--tr), border-color var(--tr);
}
.btn-manage-edit {
    border-color: rgba(0,87,255,0.2);
    color: var(--blue);
}
.btn-manage-edit:hover {
    background: var(--blue-dim);
    border-color: var(--blue);
}
.btn-manage-delete {
    border-color: rgba(220,50,50,0.2);
    color: #e03030;
}
.btn-manage-delete:hover {
    background: rgba(220,50,50,0.08);
    border-color: #e03030;
}

/* =========================================
   CARD COLLABS (details-projets.php)
   ========================================= */
.card-collabs {
    display: flex;
    align-items: center;
    gap: -6px;
    padding: 0 22px 10px;
    flex-wrap: nowrap;
}

.collab-avatar-mini {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,87,255,0.15) 0%, rgba(0,87,255,0.08) 100%);
    border: 2px solid white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--blue);
    margin-right: -6px;
    font-family: var(--fb);
    transition: transform var(--tr);
    cursor: default;
    position: relative;
}
.collab-avatar-mini:hover { transform: translateY(-2px) scale(1.1); z-index: 2; }
.collab-more {
    background: var(--blue-dim);
    color: var(--blue);
    font-size: 0.55rem;
}

/* Collabs dans le panel */
.preview-collabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.collab-panel-tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--blue-dim);
    color: var(--blue);
    border: 1px solid rgba(0,87,255,0.2);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}