/* ════════════════════════════════════════════════════════
   CMCI OBILI — PAGE DÉPARTEMENT
   Design system cohérent avec style_index.css
   "Toute la gloire à Dieu" 🙏
   ════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════
   1. HERO DÉPARTEMENT — Cinématique Immersif
   ════════════════════════════════════════════════════════ */
.dept-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--primary-dark);
    margin-top: calc(var(--nav-h) * -1);
    padding-top: var(--nav-h);
}

.dept-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: deptHeroZoom 25s ease-in-out infinite alternate;
    will-change: transform;
    filter: saturate(1.1) contrast(1.05);
}

@keyframes deptHeroZoom {
    from { transform: scale(1.05); }
    to   { transform: scale(1.15); }
}

.dept-hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.dept-hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
}

.dept-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 3rem 1.5rem;
    max-width: 880px;
}

.dept-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #fff;
    font-weight: 600;
    margin-bottom: 2rem;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--r-pill);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: fadeUp 0.8s var(--ease-out) both;
}

.dept-hero-eyebrow i { 
    color: var(--accent-light); 
    text-shadow: 0 0 10px var(--accent-light);
    font-size: 2rem;
}

.dept-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    animation: fadeUp 0.8s var(--ease-out) 0.1s both;
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.dept-hero-title span {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 50%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
    font-family: var(--font-accent);
    font-weight: 600;
    filter: drop-shadow(0 4px 15px rgba(201, 164, 76, 0.4));
}

.dept-hero-desc {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.dept-hero-actions {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); filter: blur(5px); }
    to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ════════════════════════════════════════════════════════
   2. STATS BANNER — Bento Glassmorphism
   ════════════════════════════════════════════════════════ */
.dept-stats-banner {
    background: var(--gradient-primary);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

.dept-stats-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M0 0h20v20H0zM20 20h20v20H20z'/%3E%3C/g%3E%3C/svg%3E");
}

.dept-stats-banner > * { position: relative; }

.dept-stat-item { text-align: center; }

.dept-stat-num {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-light) 0%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
}

.dept-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 0.2rem;
    font-weight: 600;
}

.dept-stat-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin: 0.5rem 0;
}

/* ════════════════════════════════════════════════════════
   3. SECTIONS — Typographie Magazine
   ════════════════════════════════════════════════════════ */
.dept-section { padding: 5rem 0; position: relative; }
.dept-section-alt { background: var(--bg-alt); }

.dept-section-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dept-section-eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.dept-section-eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-soft), transparent);
    max-width: 80px;
}

.dept-section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    letter-spacing: -0.03em;
    color: var(--text);
}

.dept-section-title span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
    font-family: var(--font-accent);
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════
   4. RESPONSABLE CARD — Bento Premium
   ════════════════════════════════════════════════════════ */
.dept-responsable-card {
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
    position: relative;
}

.dept-responsable-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, var(--primary-soft) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.dept-responsable-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -15px color-mix(in srgb, var(--primary) 20%, transparent);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.dept-responsable-card:hover::before { opacity: 1; }
.dept-responsable-card > * { position: relative; z-index: 1; }

.dept-responsable-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-primary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dept-responsable-card:hover .dept-responsable-avatar {
    transform: rotate(-8deg) scale(1.05);
}

.dept-responsable-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.dept-responsable-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dept-responsable-info p i {
    color: var(--accent);
    width: 20px;
}

/* ════════════════════════════════════════════════════════
   5. BOUTONS ACTION — Premium Glassmorphism
   ════════════════════════════════════════════════════════ */
.dept-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 1rem 2.4rem;
    border-radius: var(--r-pill);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(201, 164, 76, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.dept-btn-action.primary {
    background: var(--gradient-accent);
    color: #1a0f2e;
}

.dept-btn-action.primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.dept-btn-action.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(201, 164, 76, 0.55), inset 0 1px 0 rgba(255,255,255,0.3);
    color: #1a0f2e;
}

.dept-btn-action.primary:hover::before { transform: translateX(100%); }

.dept-btn-action.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dept-btn-action.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dept-btn-action:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ════════════════════════════════════════════════════════
   6. MEMBRES GRID — Bento Cards
   ════════════════════════════════════════════════════════ */
.dept-membres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.dept-membre-card {
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}

.dept-membre-card:hover {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
    box-shadow: 0 25px 50px -15px color-mix(in srgb, var(--primary) 25%, transparent);
}

.dept-membre-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-primary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dept-membre-card:hover .dept-membre-avatar {
    transform: rotate(-8deg) scale(1.1);
}

.dept-membre-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.dept-membre-role {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════
   7. PUBLICATIONS — Bento Cards avec Lueur
   ════════════════════════════════════════════════════════ */
.dept-pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.dept-pub-card {
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.dept-pub-card:hover {
    transform: translateY(-10px);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
    box-shadow: 0 25px 50px -15px color-mix(in srgb, var(--primary) 25%, transparent);
    color: inherit;
}

.dept-pub-img-wrap {
    position: relative;
    padding-top: 58%;
    overflow: hidden;
    background: var(--bg-soft);
}

.dept-pub-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.dept-pub-card:hover .dept-pub-img-wrap img { 
    transform: scale(1.08); 
    filter: brightness(1.05);
}

.dept-pub-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.5) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.dept-pub-card:hover .dept-pub-img-wrap::after { opacity: 1; }

.dept-pub-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: var(--r-pill);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.dept-pub-body {
    padding: 1.8rem 1.75rem 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dept-pub-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.dept-pub-meta i { color: var(--accent); margin-right: 0.35rem; }

.dept-pub-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.dept-pub-card:hover .dept-pub-title { color: var(--primary); }

.dept-pub-excerpt {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.75;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.dept-pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    margin-top: auto;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.dept-pub-link:hover { 
    gap: 0.9rem; 
    color: var(--accent); 
}

/* ════════════════════════════════════════════════════════
   8. EMPTY STATE
   ════════════════════════════════════════════════════════ */
.dept-empty-state {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
    background: var(--bg-alt);
    border-radius: 24px;
    border: 1px dashed var(--border-strong);
}

.dept-empty-state i {
    font-size: 3.5rem;
    color: var(--border-strong);
    margin-bottom: 1.5rem;
}

.dept-empty-state h4 {
    font-family: var(--font-display);
    color: var(--text);
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
}

/* ════════════════════════════════════════════════════════
   9. RESPONSIVE
   ════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .dept-section { padding: 4rem 0; }
    .dept-responsable-card { flex-direction: column; text-align: center; padding: 2rem; }
}

@media (max-width: 767.98px) {
    .dept-hero { min-height: 60vh; }
    .dept-hero-actions { flex-direction: column; align-items: stretch; gap: 1rem; }
    .dept-btn-action { justify-content: center; }
    .dept-stats-banner { padding: 2.5rem 0; }
    .dept-stat-divider { display: none; }
    .dept-stat-item { margin-bottom: 1.5rem; }
    .dept-pub-grid { grid-template-columns: 1fr; }
    .dept-membres-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
}
