:root {
    --navy: #0f172a;
    --navy-light: #1e293b;
    --gold: #b49a5b;
    --gold-hover: #c9b175;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; }

h1, h2, h3, .hero-quote, .brand .title { font-family: 'Playfair Display', serif; color: var(--navy); }
a { text-decoration: none; color: inherit; transition: var(--transition); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section-spacing { padding: 100px 0; }

.top-bar { background-color: var(--navy); color: var(--white); font-size: 0.8rem; letter-spacing: 0.5px; text-transform: uppercase; padding: 8px 0; }
.top-bar-inner { display: flex; justify-content: flex-end; align-items: center; }
.top-bar-links { display: flex; gap: 20px; }
.top-bar-links a { color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 6px; }
.top-bar-links a:hover { color: var(--gold); }

.main-header { position: sticky; top: 0; z-index: 999; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,0.05); transition: var(--transition); }
.main-header.scrolled { padding: 10px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.03); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 90px; transition: height var(--transition); }
.main-header.scrolled .header-inner { height: 70px; }

.brand { display: flex; align-items: center; gap: 15px; }
.logo { height: 50px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand .title { font-size: 1.2rem; font-weight: 700; line-height: 1.1; }
.brand .subtitle { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-family: 'Inter', sans-serif; }

.nav-list { display: flex; gap: 32px; list-style: none; }
.nav-list a { font-size: 0.95rem; font-weight: 500; color: var(--navy-light); position: relative; padding-bottom: 5px; }
.nav-list a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gold); transition: var(--transition); }
.nav-list a:hover::after { width: 100%; }

.burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 6px; }
.burger span { width: 30px; height: 2px; background: var(--navy); transition: var(--transition); }

.hero { position: relative; height: calc(100vh - 90px); min-height: 600px; display: flex; align-items: center; overflow: hidden; }
.hero-image { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.05); animation: zoomOut 10s ease-out forwards; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.4) 100%); }
.hero-content { position: relative; z-index: 1; color: var(--white); max-width: 800px; }
.hero-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 3px; color: var(--gold); margin-bottom: 20px; display: block; font-weight: 600; }
.hero-quote { font-size: 4.5rem; font-weight: 400; font-style: italic; line-height: 1.1; margin-bottom: 24px; }
.hero-author { font-size: 1.2rem; opacity: 0.9; margin-bottom: 40px; font-weight: 300; }
.btn-primary { display: inline-block; background-color: var(--gold); color: var(--white); padding: 16px 36px; border-radius: 4px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; font-size: 0.9rem; }
.btn-primary:hover { background-color: var(--gold-hover); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(180, 154, 91, 0.2); }

.floating-socials { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 1000; }
.social-btn { width: 45px; height: 45px; border-radius: 50%; background: var(--white); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transition: var(--transition); border: 1px solid rgba(0,0,0,0.05); }
.social-btn:hover { background: var(--navy); color: var(--gold); transform: translateX(-5px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }

.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 50px; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 20px; }
.header-titles h2 { font-size: 2.5rem; color: var(--navy); margin-bottom: 8px; }
.header-titles .subtitle { font-size: 1.1rem; color: var(--text-muted); }
.link-arrow { color: var(--gold); font-weight: 600; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }
.link-arrow:hover { color: var(--navy); gap: 12px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.news-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.05); transition: var(--transition); display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); border-color: rgba(180, 154, 91, 0.3); }

.news-image { height: 240px; background-size: cover; background-position: center; position: relative; }
.news-badge { position: absolute; top: 15px; left: 15px; background: var(--navy); color: var(--gold); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; padding: 6px 12px; border-radius: 4px; font-weight: 600; }

.news-content { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }
.news-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; font-family: 'Playfair Display', serif; font-style: italic; }
.news-content h3 { font-size: 1.4rem; color: var(--navy); margin-bottom: 15px; line-height: 1.3; }
.news-excerpt { font-size: 0.95rem; color: var(--text-main); margin-bottom: 25px; flex-grow: 1; }
.read-more { color: var(--navy); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 6px; }
.news-card:hover .read-more { color: var(--gold); }

.agenda-epure { background-color: var(--white); padding: 80px 0; }
.agenda-container-epure { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.agenda-header-epure { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 20px; margin-bottom: 60px; }
.agenda-header-epure h2 { font-size: 2.2rem; color: var(--navy); margin: 0; }

.agenda-split-epure { display: grid; grid-template-columns: 1fr 2.5fr; gap: 80px; align-items: flex-start; }
.agenda-date-epure { display: flex; flex-direction: column; text-align: left; position: sticky; top: 120px; }
.agenda-date-epure .day-name { font-size: 1.1rem; color: var(--gold); text-transform: uppercase; letter-spacing: 3px; font-weight: 500; }
.agenda-date-epure .day-number { font-family: 'Playfair Display', serif; font-size: 5rem; line-height: 1; color: var(--navy); margin: 10px 0; font-weight: 400; }
.agenda-date-epure .month-year { font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; }

.agenda-list-epure { max-height: 500px; overflow-y: auto; padding-right: 30px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.agenda-list-epure::-webkit-scrollbar { width: 3px; }
.agenda-list-epure::-webkit-scrollbar-track { background: transparent; }
.agenda-list-epure::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

.agenda-item-epure { display: flex; align-items: flex-start; gap: 40px; padding: 30px 0; border-bottom: 1px solid rgba(0,0,0,0.05); transition: var(--transition); }
.agenda-item-epure:last-child { border-bottom: none; }
.agenda-item-epure:hover { padding-left: 15px; }

.agenda-time-epure { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--gold); font-weight: 600; width: 60px; flex-shrink: 0; padding-top: 2px; }
.agenda-details-epure h3 { font-family: 'Inter', sans-serif; font-size: 1.2rem; font-weight: 500; color: var(--navy); margin-bottom: 8px; }
.agenda-location-epure { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; display: flex; align-items: center; gap: 8px; }
.agenda-location-epure i { color: var(--gold); }

.newsletter { background-color: var(--bg-color); color: var(--navy); border-top: 1px solid rgba(0,0,0,0.05); }
.newsletter-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 40px; }
.newsletter-text h2 { color: var(--navy); font-size: 2rem; margin-bottom: 10px; }
.newsletter-text p { color: var(--text-muted); }
.input-group { display: flex; width: 400px; max-width: 100%; background: var(--white); border-radius: 4px; padding: 5px; border: 1px solid rgba(0,0,0,0.1); }
.input-group input { flex: 1; background: transparent; border: none; padding: 12px 20px; color: var(--navy); outline: none; font-family: 'Inter', sans-serif; }
.input-group input::placeholder { color: var(--text-muted); }
.input-group button { background: var(--gold); color: var(--white); border: none; padding: 0 24px; border-radius: 4px; cursor: pointer; transition: var(--transition); }
.input-group button:hover { background: var(--navy); color: var(--white); }

.footer { background-color: var(--navy-light); color: var(--white); padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 60px; margin-bottom: 30px; }
.footer-logo { height: 70px; margin-bottom: 20px; filter: grayscale(100%) brightness(200%); opacity: 0.5; }
.footer h3 { color: var(--white); margin-bottom: 10px; }
.footer p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-links h4 { font-family: 'Inter', sans-serif; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; color: var(--gold); margin-bottom: 20px; }
.footer-links a { display: block; color: rgba(255,255,255,0.7); margin-bottom: 12px; font-size: 0.95rem; }
.footer-links a:hover { color: var(--white); transform: translateX(5px); }
.footer-bottom { text-align: center; color: rgba(255,255,255,0.5); font-size: 0.85rem; }

@keyframes zoomOut { from { transform: scale(1.1); } to { transform: scale(1); } }

@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .agenda-split-epure { gap: 40px; grid-template-columns: 1fr 2fr; }
}

@media (max-width: 900px) {
    .agenda-split-epure { grid-template-columns: 1fr; gap: 40px; }
    .agenda-date-epure { position: static; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 20px; }
    .agenda-item-epure { flex-direction: column; gap: 15px; }
    .agenda-time-epure { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    .section-spacing { padding: 80px 0; } 
    .container { padding: 0 25px; }
    .news-wall {margin-bottom: 15px; margin-top: 30px}
    .header-inner { height: 70px; }
    .burger { display: flex; z-index: 1001; } 
    
    .main-nav { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(255, 255, 255, 0.98); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: var(--transition); }
    .main-nav.active { opacity: 1; visibility: visible; }
    .nav-list { flex-direction: column; gap: 40px; text-align: center; }
    .nav-list a { font-size: 1.4rem; color: var(--navy); }

    .burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .burger.open span:nth-child(2) { opacity: 0; }
    .burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero-quote { font-size: 2.5rem; margin-bottom: 20px; }
    .hero-author { font-size: 1rem; margin-bottom: 40px; }
    
    .section-header { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 40px; }
    .header-titles h2 { font-size: 2rem; line-height: 1.2; }

    .news-grid { grid-template-columns: 1fr; gap: 35px; }
    .news-image { height: 240px; }
    
    .agenda-split-epure { grid-template-columns: 1fr; gap: 20px; }
    .agenda-list-epure { max-height: none; overflow-y: visible; padding-right: 0; }
    
    .agenda-date-epure { position: static; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 30px; margin-bottom: 10px; align-items: center; text-align: center; }
    .agenda-date-epure .day-number { font-size: 4.5rem; margin: 5px 0; color: var(--navy); }
    
    .agenda-item-epure { flex-direction: column; gap: 12px; padding: 30px 0; border-bottom: 1px solid rgba(0,0,0,0.03); }
    .agenda-time-epure { width: 100%; font-size: 1.1rem; padding-bottom: 8px; border-bottom: 1px solid rgba(180, 154, 91, 0.3); }
    .agenda-details-epure h3 { font-size: 1.15rem; line-height: 1.4; margin-bottom: 10px; }

    .floating-socials { top: auto; bottom: 20px; right: 50%; transform: translateX(50%); flex-direction: row; gap: 12px; }
    .social-btn { width: 42px; height: 42px; font-size: 1.1rem; }

    .newsletter-inner { flex-direction: column; align-items: flex-start; gap: 30px; }
    .input-group { width: 100%; flex-direction: column; gap: 15px; background: transparent; border: none; padding: 0; }
    .input-group input { border: 1px solid rgba(0,0,0,0.1); border-radius: 4px; padding: 16px; width: 100%; background: var(--white); }
    .input-group button { width: 100%; padding: 16px; border-radius: 4px; font-weight: 600; }

    .footer-grid { grid-template-columns: 1fr; gap: 40px; padding-bottom: 40px; }
}

/* =========================================
   PAGE DE CONNEXION (SPLIT SCREEN ANIMÉ)
   ========================================= */

.split-login-body { margin: 0; padding: 0; height: 100vh; overflow: hidden; background-color: var(--white); }

.split-layout { display: flex; width: 100%; height: 100vh; }

.split-visual { position: relative; flex: 1.2; overflow: hidden; display: flex; align-items: center; justify-content: center; }

.visual-bg { position: absolute; inset: -5%; background-size: cover; background-position: center; animation: slowZoom 20s infinite alternate ease-in-out; }
.visual-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.4) 100%); }

.visual-content { position: relative; z-index: 2; text-align: center; color: var(--white); padding: 40px; }
.visual-logo { height: 120px; margin-bottom: 30px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3)); }
.visual-content h2 { font-size: 2rem; margin-bottom: 10px; color: var(--white); letter-spacing: 2px; text-transform: uppercase; }
.visual-content .motto { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-style: italic; color: var(--gold); opacity: 0.9; }

.split-form-container { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--white); position: relative; }
.form-wrapper { width: 100%; max-width: 420px; padding: 40px; }

.back-link { position: absolute; top: 40px; right: 40px; font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 1px; }
.back-link:hover { color: var(--navy); transform: translateX(-5px); }

.form-header { margin-bottom: 50px; }
.form-header h1 { font-size: 2.2rem; color: var(--navy); margin-bottom: 10px; line-height: 1.2; }
.form-header p { color: var(--text-muted); font-size: 0.95rem; }

.login-alert { background: rgba(220, 38, 38, 0.05); color: #b91c1c; padding: 15px; border-left: 3px solid #b91c1c; border-radius: 0 4px 4px 0; font-size: 0.9rem; margin-bottom: 30px; display: flex; align-items: center; gap: 10px; }

.floating-group { position: relative; margin-bottom: 35px; }
.floating-input { width: 100%; border: none; padding: 10px 0; font-family: 'Inter', sans-serif; font-size: 1rem; color: var(--navy); background: transparent; border-bottom: 1px solid rgba(0,0,0,0.1); transition: 0.3s; }
.floating-input:focus { outline: none; }
.input-line { position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gold); transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.floating-input:focus ~ .input-line { width: 100%; }

.floating-label { position: absolute; left: 0; top: 12px; color: var(--text-muted); pointer-events: none; transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); font-size: 1rem; }
.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label { top: -20px; font-size: 0.75rem; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.btn-auth-animated { width: 100%; background: var(--navy); color: var(--white); border: none; padding: 16px; border-radius: 4px; font-size: 0.95rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; transition: all 0.4s ease; display: flex; justify-content: center; align-items: center; gap: 12px; position: relative; overflow: hidden; margin-top: 10px; }
.btn-auth-animated:hover { background: var(--gold); box-shadow: 0 10px 25px rgba(180, 154, 91, 0.3); transform: translateY(-3px); }
.btn-auth-animated i { transition: 0.3s; }
.btn-auth-animated:hover i { transform: translateX(5px); }

.form-footer { margin-top: 40px; text-align: center; font-size: 0.75rem; color: #a1a1aa; text-transform: uppercase; letter-spacing: 1px; }

@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.1); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.fade-in-up { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.fade-in-left { animation: fadeInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; animation-delay: 0.2s; }
.shake-animation { animation: shake 0.4s ease-in-out; }

@media (max-width: 900px) {
    .split-layout { flex-direction: column; }
    .split-visual { display: none; }
    .split-login-body { overflow: auto; }
    .split-form-container { min-height: 100vh; padding: 40px 20px; align-items: center; }
    .back-link { top: 20px; right: 20px; font-size: 0.75rem; }
    .form-wrapper { padding: 20px; margin-top: 30px; }
}

/* =========================================
   LAYOUT ADMINISTRATION & INTRANET
   ========================================= */
.admin-layout { display: flex; height: 100vh; overflow: hidden; background-color: var(--bg-color); }

.admin-sidebar { width: 280px; background-color: var(--navy); color: var(--white); display: flex; flex-direction: column; flex-shrink: 0; box-shadow: 2px 0 15px rgba(0,0,0,0.1); z-index: 10; }
.admin-brand { padding: 30px 25px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 15px; }
.admin-brand img { height: 45px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.admin-brand h2 { font-family: 'Playfair Display', serif; color: var(--gold); font-size: 1.1rem; margin: 0; line-height: 1.2; }
.admin-brand span { font-family: 'Inter', sans-serif; font-size: 0.7rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }

.admin-nav { flex: 1; overflow-y: auto; padding: 20px 0; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.admin-nav::-webkit-scrollbar { width: 4px; }
.admin-nav::-webkit-scrollbar-thumb { background: var(--gold); }

.admin-nav-group { margin-bottom: 25px; }
.admin-nav-title { padding: 0 25px; font-size: 0.7rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; font-weight: 600; }
.admin-nav ul { list-style: none; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 25px; color: rgba(255,255,255,0.7); font-size: 0.95rem; transition: var(--transition); border-left: 3px solid transparent; }
.admin-nav a i { width: 20px; text-align: center; font-size: 1.1rem; }
.admin-nav a:hover { color: var(--white); background: rgba(255,255,255,0.03); }
.admin-nav a.active { color: var(--white); background: rgba(255,255,255,0.05); border-left-color: var(--gold); font-weight: 500; }

.admin-subnav { background: rgba(0,0,0,0.2); border-top: 1px solid rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.02); padding: 10px 0; }
.admin-subnav a { padding: 10px 25px 10px 55px; font-size: 0.85rem; border-left: none; }
.admin-subnav a:hover, .admin-subnav a.sub-active { color: var(--gold); background: transparent; }

.admin-user { padding: 20px 25px; border-top: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.15); display: flex; justify-content: space-between; align-items: center; }
.admin-user-info { display: flex; flex-direction: column; }
.admin-user-email { font-size: 0.8rem; color: var(--white); font-weight: 500; }
.admin-user-logout { color: #f87171; transition: var(--transition); }
.admin-user-logout:hover { color: #ef4444; transform: scale(1.1); }

.admin-content { flex: 1; overflow-y: auto; padding: 40px 50px; position: relative; }
.admin-page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 20px; }
.admin-page-header h1 { font-size: 2rem; color: var(--navy); margin: 0; }

@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; max-height: 50vh; }
    .admin-content { padding: 25px; }
}

/* =========================================
   WEBMAIL MODERNE : LISTE DES EMAILS
   ========================================= */
.btn-primary-outline { padding: 8px 16px; border: 1px solid var(--navy); color: var(--navy); border-radius: 4px; font-size: 0.85rem; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-primary-outline:hover { background: var(--navy); color: var(--white); }

.modern-mail-list { background: var(--white); border-radius: 8px; border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 5px 20px rgba(0,0,0,0.02); display: flex; flex-direction: column; }
.modern-mail-item { display: flex; align-items: center; gap: 20px; padding: 15px 25px; border-bottom: 1px solid rgba(0,0,0,0.04); transition: var(--transition); text-decoration: none; color: inherit; }
.modern-mail-item:last-child { border-bottom: none; }
.modern-mail-item:hover { background-color: #f8fafc; }

.mail-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(180, 154, 91, 0.2); color: var(--navy); display: flex; justify-content: center; align-items: center; font-weight: 600; font-size: 1.1rem; flex-shrink: 0; }
.is-unread .mail-avatar { background: var(--navy); color: var(--gold); }

.mail-details { flex-grow: 1; min-width: 0; }
.mail-top-row { display: flex; justify-content: space-between; margin-bottom: 4px; align-items: center; }
.mail-sender-name { font-weight: 500; color: var(--text-main); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.mail-subject-line { font-size: 0.9rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.is-unread .mail-sender-name { font-weight: 700; color: var(--navy); }
.is-unread .mail-subject-line { font-weight: 500; color: var(--navy-light); }
.is-unread { position: relative; }
.is-unread::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }

/* =========================================
   WEBMAIL MODERNE : LECTURE D'UN EMAIL
   ========================================= */
.email-reader { background: var(--white); border-radius: 8px; border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 5px 20px rgba(0,0,0,0.02); overflow: hidden; }

.email-reader-toolbar { display: flex; justify-content: space-between; padding: 15px 25px; border-bottom: 1px solid rgba(0,0,0,0.05); background: #f8fafc; }
.btn-back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: 0.2s; }
.btn-back:hover { color: var(--navy); }
.toolbar-actions { display: flex; gap: 10px; }
.btn-icon { background: none; border: 1px solid rgba(0,0,0,0.1); width: 35px; height: 35px; border-radius: 4px; color: var(--text-main); cursor: pointer; transition: 0.2s; }
.btn-icon:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.email-reader-header { padding: 30px 40px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.email-subject-large { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--navy); margin-bottom: 25px; line-height: 1.2; }
.email-meta { display: flex; align-items: center; gap: 15px; }
.mail-avatar-large { width: 50px; height: 50px; border-radius: 50%; background: var(--navy); color: var(--gold); display: flex; justify-content: center; align-items: center; font-weight: 600; font-size: 1.4rem; }
.email-sender-info { flex-grow: 1; display: flex; flex-direction: column; }
.email-sender-info strong { font-size: 1.05rem; color: var(--navy); }
.email-sender-info span { font-size: 0.85rem; color: var(--text-muted); }
.email-date-large { font-size: 0.85rem; color: var(--text-muted); }

.email-attachments { padding: 20px 40px; background: rgba(180, 154, 91, 0.05); border-bottom: 1px solid rgba(0,0,0,0.05); }
.email-attachments h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--navy); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.attachments-list { display: flex; flex-wrap: wrap; gap: 15px; }
.attachment-pill { background: var(--white); border: 1px solid rgba(0,0,0,0.1); padding: 10px 15px; border-radius: 4px; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--navy); transition: 0.2s; cursor: pointer; }
.attachment-pill:hover { border-color: var(--gold); box-shadow: 0 4px 10px rgba(180, 154, 91, 0.1); }
.pj-name { font-weight: 500; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-size { color: var(--text-muted); font-size: 0.75rem; }

.email-body-content { padding: 40px; min-height: 300px; font-family: 'Inter', sans-serif; color: var(--text-main); font-size: 1rem; line-height: 1.6; overflow-x: auto; }

/* =========================================
   MODAL (CRÉATION DE DOSSIER)
   ========================================= */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; transition: var(--transition); backdrop-filter: blur(3px); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--white); width: 100%; max-width: 400px; border-radius: 8px; padding: 30px; box-shadow: 0 15px 40px rgba(0,0,0,0.2); transform: translateY(20px); transition: var(--transition); border-top: 4px solid var(--gold); }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-family: 'Inter', sans-serif; font-size: 1.2rem; color: var(--navy); margin: 0; font-weight: 600; }
.btn-close { background: none; border: none; font-size: 1.8rem; line-height: 1; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
.btn-close:hover { color: #ef4444; transform: rotate(90deg); }

/* =========================================
   COMPOSITION D'UN EMAIL (MODERNE)
   ========================================= */
.modern-compose-wrapper { background: var(--white); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.05); overflow: hidden; display: flex; flex-direction: column; min-height: 700px; }
.compose-top-bar { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; background: var(--navy); color: var(--white); }
.compose-top-bar h2 { font-size: 1.1rem; margin: 0; font-family: 'Inter', sans-serif; font-weight: 500; }
.btn-close-compose { color: rgba(255,255,255,0.6); font-size: 1.2rem; transition: 0.2s; }
.btn-close-compose:hover { color: var(--white); transform: scale(1.1); }

.compose-headers-seamless { padding: 0 25px; }
.seamless-row { display: flex; align-items: flex-start; border-bottom: 1px solid rgba(0,0,0,0.06); padding: 8px 0; min-height: 48px; }
.subject-row { align-items: center; padding: 15px 0; }
.row-label { width: 50px; color: var(--text-muted); font-size: 0.9rem; padding-top: 8px; }

.seamless-chips { border: none; padding: 0; min-height: auto; flex-grow: 1; }
.seamless-chips:focus-within { border: none; }
.chip-input { border: none; outline: none; background: transparent; font-family: 'Inter', sans-serif; font-size: 0.95rem; min-width: 200px; padding: 8px 0; }
.chip-input::placeholder { color: transparent; }
.seamless-chips:empty .chip-input::placeholder { color: rgba(0,0,0,0.2); }

.seamless-input { border: none; width: 100%; outline: none; font-family: 'Inter', sans-serif; font-size: 1.1rem; color: var(--navy); padding: 0; }
.subject-input { font-weight: 600; font-size: 1.2rem; }
.subject-input::placeholder { font-weight: 400; color: rgba(0,0,0,0.2); }

.btn-directory-icon { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 8px; transition: 0.2s; border-radius: 50%; width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; }
.btn-directory-icon:hover { background: rgba(0,0,0,0.03); color: var(--navy); }

.compose-body-seamless { flex-grow: 1; display: flex; flex-direction: column; }
.compose-body-seamless .ql-toolbar.ql-snow { border: none; border-bottom: 1px solid rgba(0,0,0,0.06); padding: 10px 25px; background: #fcfcfc; }
.compose-body-seamless .ql-container.ql-snow { border: none; font-family: 'Inter', sans-serif; font-size: 1rem; flex-grow: 1; }
.compose-body-seamless .ql-editor { padding: 30px 25px; min-height: 350px; color: var(--navy); }

.modern-attachments-list { padding: 0 25px 20px 25px; display: flex; flex-direction: column; gap: 8px; }
.modern-attachments-list .attachment-pill { border: 1px solid rgba(0,0,0,0.06); background: #f8fafc; display: flex; padding: 8px 15px; width: fit-content; min-width: 300px;}

.compose-footer-modern { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; background: #f8fafc; border-top: 1px solid rgba(0,0,0,0.06); }
.footer-actions-left, .footer-actions-right { display: flex; align-items: center; gap: 10px; }

.btn-tool { background: var(--white); border: 1px solid rgba(0,0,0,0.1); color: var(--text-muted); width: 40px; height: 40px; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; font-size: 1rem; }
.btn-tool:hover { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.btn-tool-danger { background: var(--white); border: 1px solid rgba(0,0,0,0.1); color: var(--text-muted); width: 40px; height: 40px; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; font-size: 1rem; }
.btn-tool-danger:hover { background: #ef4444; color: var(--white); border-color: #ef4444; }
.btn-send { padding: 12px 30px; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; border-radius: 6px; }

@media (max-width: 900px) {
    .modern-compose-wrapper { border-radius: 0; border: none; min-height: 100vh; }
    .compose-footer-modern { flex-direction: column-reverse; gap: 20px; align-items: stretch; }
    .footer-actions-right, .footer-actions-left { justify-content: space-between; }
    .btn-send { width: 100%; justify-content: center; }
}

/* =========================================
   BARRE DE RECHERCHE ET ÉTATS VIDES
   ========================================= */
.search-form-modern { display: flex; align-items: center; }
.search-input-wrapper { position: relative; display: flex; align-items: center; }
.search-input-wrapper i { position: absolute; left: 15px; color: var(--text-muted); font-size: 0.9rem; }
.search-input-wrapper input { padding: 10px 15px 10px 40px; border: 1px solid rgba(0,0,0,0.1); border-radius: 30px; font-family: 'Inter', sans-serif; font-size: 0.9rem; outline: none; transition: 0.3s; width: 250px; background: var(--white); }
.search-input-wrapper input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180, 154, 91, 0.1); width: 300px; }

@media (max-width: 900px) {
    .search-input-wrapper input, .search-input-wrapper input:focus { width: 100%; }
    .header-actions { flex-wrap: wrap; width: 100%; }
    .search-form-modern { width: 100%; order: -1; margin-bottom: 15px; }
}

/* Centrage vertical et horizontal de la section "vide" */
.empty-inbox {
    padding: 100px 20px;
    text-align: center;
    background: var(--white);
    border-radius: 8px;
    border: 1px dashed rgba(0,0,0,0.15);
    color: var(--text-muted);
    margin-top: 20px;
    
    /* Flexbox pour forcer le centrage de l'icône et du texte */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px; /* Donne de la hauteur à la zone vide */
}

.empty-inbox i { margin-bottom: 15px; }
.empty-inbox p { font-size: 1.1rem; font-family: 'Inter', sans-serif; }

@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    
    /* Afficher le bouton burger sur mobile */
    .admin-burger { display: flex; z-index: 1001; }
    
    /* La sidebar sert d'en-tête fixe et s'étend sur toute la page quand ouverte */
    .admin-sidebar { 
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 75px; /* Hauteur de l'en-tête fermé */
        max-height: none;
        overflow: hidden; /* Masque le contenu du menu par défaut */
        transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
        z-index: 1000;
    }
    
    /* État ouvert : prend 100% de la hauteur de l'écran */
    .admin-sidebar.active { 
        height: 100vh; 
    }
    
    /* Ajustement de l'en-tête avec le logo pour mobile */
    .admin-brand {
        padding: 15px 25px;
        height: 75px;
        flex-shrink: 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    /* Zone des liens : devient scrollable verticalement */
    .admin-nav {
        overflow-y: auto; /* Rend la liste des menus scrollable */
        flex-grow: 1;
        padding: 20px 0 50px 0; 
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease;
    }
    
    /* Bloc utilisateur en bas du menu */
    .admin-user {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease;
        margin-top: auto; 
    }

    /* Apparition du contenu une fois le menu ouvert */
    .admin-sidebar.active .admin-nav,
    .admin-sidebar.active .admin-user {
        opacity: 1;
        visibility: visible;
        transition-delay: 0.2s; /* Léger délai pour laisser le panneau descendre d'abord */
    }
    
    /* Le contenu principal de la page */
    .admin-content { 
        padding: 25px; 
        width: 100%; 
        margin-top: 75px; /* Laisse la place pour la barre du haut */
    }
}

/* Style spécifique pour le bouton burger de l'intranet */
.admin-burger {
    background: transparent;
    border: none;
    padding: 10px; /* Élargit la zone cliquable pour les doigts */
    cursor: pointer;
}

/* Forcer la couleur des 3 petites lignes en blanc */
.admin-burger span {
    background-color: var(--white);
}

/* Optionnel : Si vous utilisez la classe .open en JavaScript pour transformer le burger en croix */
.admin-burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.admin-burger.open span:nth-child(2) { opacity: 0; }
.admin-burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }