/*
Theme Name: Vademecum ISFSC
Theme URI: https://vademecum.isfsc.be
Author: ISFSC
Author URI: https://isfsc.be
Description: Theme custom pour le vade-mecum administratif des etudiants de l'ISFSC. Integre les Custom Post Types Documents, Rubriques, Contacts, FAQ et Modes urgence.
Version: 1.4
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vademecum-isfsc
Tags: education, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --isfsc-red: #ED1C24;
  --isfsc-red-dark: #C41820;
  --isfsc-red-light: #FDECEC;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --ink-muted: #8A8A8A;
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --bg-card: #FFFFFF;
  --border: #E8E8E8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--isfsc-red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.vm-topbar { background: #0F0F0F; color: #fff; font-size: 13px; padding: 8px 0; }
.vm-topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: flex-end; align-items: center; gap: 16px; flex-wrap: wrap; }
.vm-topbar a { color: #ccc; margin-left: 16px; font-size: 13px; }
.vm-topbar a:hover { color: #fff; }

.vm-header { background: rgba(255,255,255,0.92); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(8px); transition: box-shadow .25s; }
.vm-header.is-scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.vm-header-inner { max-width: 1200px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.vm-logo { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.vm-logo:hover { text-decoration: none; }
.vm-logo img { height: 36px; width: auto; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.vm-logo:hover img { transform: rotate(-3deg) translateY(-2px); }
.vm-logo-divider { width: 1px; height: 28px; background: var(--border); }
.vm-logo-text { color: var(--ink); font-weight: 700; font-size: 15px; letter-spacing: -0.3px; }
.vm-logo-text .accent { color: var(--isfsc-red); font-weight: 600; }
.vm-logo-text small { display: block; font-size: 11px; color: var(--ink-muted); font-weight: 500; margin-top: 2px; letter-spacing: 0.3px; }

.vm-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.vm-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; align-items: center; }
.vm-nav li { list-style: none; }
.vm-nav a { color: var(--ink-soft); padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; transition: all 0.15s; position: relative; display: inline-block; }
.vm-nav a::after { content: ""; position: absolute; bottom: 4px; left: 14px; right: 14px; height: 2px; background: var(--isfsc-red); transform: scaleX(0); transform-origin: center; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.vm-nav a:hover { background: var(--isfsc-red-light); color: var(--isfsc-red); text-decoration: none; }
.vm-nav a:hover::after { transform: scaleX(1); }
.vm-nav a.vm-nav-cta, .vm-nav .current-menu-item:last-child a { background: var(--isfsc-red); color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 600; position: relative; overflow: hidden; }
.vm-nav a.vm-nav-cta::after { display: none; }
.vm-nav a.vm-nav-cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent); transform: translateX(-100%); transition: transform 0.6s; }
.vm-nav a.vm-nav-cta:hover { background: var(--isfsc-red-dark); color: #fff; }
.vm-nav a.vm-nav-cta:hover::before { transform: translateX(100%); }

.vm-hero { background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%); padding: 64px 24px 48px; text-align: center; }
.vm-hero-inner { max-width: 800px; margin: 0 auto; }
.vm-hero-badge { display: inline-block; background: var(--isfsc-red-light); color: var(--isfsc-red); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.vm-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px; }
.vm-hero h1 em { font-style: italic; color: var(--isfsc-red); }
.vm-hero-sub { font-size: 18px; color: var(--ink-soft); max-width: 600px; margin: 0 auto 32px; }
.vm-search { background: #fff; border: 2px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 20px; display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto; box-shadow: var(--shadow-md); transition: all 0.2s; }
.vm-search:focus-within { border-color: var(--isfsc-red); box-shadow: 0 0 0 4px var(--isfsc-red-light), var(--shadow-md); }
.vm-search svg { color: var(--ink-muted); flex-shrink: 0; }
.vm-search input { flex: 1; border: none; outline: none; font-size: 16px; background: transparent; padding: 12px 0; font-family: inherit; color: var(--ink); }
.vm-search button { background: var(--isfsc-red); color: #fff; border: none; padding: 12px 20px; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 14px; transition: background 0.15s; }
.vm-search button:hover { background: var(--isfsc-red-dark); }
.vm-search-hints { margin-top: 20px; font-size: 13px; color: var(--ink-muted); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.vm-hint { background: #fff; border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: all 0.15s; color: var(--ink-soft); text-decoration: none; }
.vm-hint:hover { border-color: var(--isfsc-red); color: var(--isfsc-red); text-decoration: none; transform: translateY(-2px); }

.vm-section { padding: 64px 24px; max-width: 1200px; margin: 0 auto; }
.vm-section.vm-alt { background: var(--bg-soft); max-width: none; }
.vm-section.vm-alt .vm-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.vm-section-header { margin-bottom: 40px; }
.vm-section-header h2 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 10px; }
.vm-section-header p { color: var(--ink-soft); font-size: 16px; max-width: 600px; }

.vm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.vm-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: all 0.2s; cursor: pointer; display: block; color: inherit; text-decoration: none; position: relative; overflow: hidden; }
.vm-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--isfsc-red); transform: scaleX(0); transform-origin: left; transition: transform 0.25s; }
.vm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--isfsc-red); text-decoration: none; }
.vm-card:hover::before { transform: scaleX(1); }
.vm-card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--isfsc-red-light); color: var(--isfsc-red); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 22px; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s, color 0.25s; }
.vm-card:hover .vm-card-icon { transform: scale(1.1) rotate(-6deg); background: var(--isfsc-red); color: #fff; }
.vm-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.vm-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.vm-card-meta { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--ink-muted); font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.vm-card-arrow { font-size: 18px; color: var(--isfsc-red); transition: transform 0.2s; }
.vm-card:hover .vm-card-arrow { transform: translateX(4px); }

.vm-urgences { background: linear-gradient(135deg, #FFF5F5 0%, #FFEBEC 100%); border-radius: var(--radius-lg); padding: 40px; margin-top: 48px; }
.vm-urgences h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.vm-urgences p { color: var(--ink-soft); margin-bottom: 24px; }
.vm-urgences-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.vm-urgence { background: #fff; padding: 16px 20px; border-radius: 10px; display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 500; font-size: 14px; border: 1px solid rgba(237,28,36,0.15); transition: all 0.15s; text-decoration: none; }
.vm-urgence:hover { transform: translateY(-2px); text-decoration: none; border-color: var(--isfsc-red); }
.vm-urgence .em { font-size: 22px; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); display: inline-block; }
.vm-urgence:hover .em { transform: scale(1.25) rotate(8deg); }

.vm-social-banner { background: linear-gradient(135deg, var(--isfsc-red) 0%, var(--isfsc-red-dark) 100%); color: #fff; border-radius: var(--radius-lg); padding: 48px; display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: center; }
.vm-social-banner h3 { font-size: 28px; margin-bottom: 12px; font-weight: 800; color: #fff; }
.vm-social-banner p { opacity: 0.95; margin-bottom: 24px; font-size: 16px; color: #fff; }
.vm-btn-white { background: #fff; color: var(--isfsc-red); padding: 14px 24px; border-radius: 10px; font-weight: 700; display: inline-block; transition: transform 0.15s; }
.vm-btn-white:hover { transform: translateY(-2px); text-decoration: none; color: var(--isfsc-red); }
.vm-social-stats { display: grid; grid-template-columns: 1fr; gap: 16px; }
.vm-stat { background: rgba(255,255,255,0.12); padding: 16px; border-radius: 10px; }
.vm-stat-num { font-size: 28px; font-weight: 800; line-height: 1; color: #fff; }
.vm-stat-label { font-size: 13px; opacity: 0.9; margin-top: 4px; color: #fff; }

.vm-doc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.vm-doc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: inherit; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.vm-doc:hover { background: #fff; border-color: var(--isfsc-red); transform: translateX(4px); text-decoration: none; box-shadow: var(--shadow-sm); }
.vm-doc-icon { width: 40px; height: 48px; border-radius: 6px; background: #fff; border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; letter-spacing: 0.5px; flex-shrink: 0; }
.vm-doc-icon.pdf  { color: #DC2626; border-color: #FCA5A5; background: #FEF2F2; }
.vm-doc-icon.doc  { color: #2563EB; border-color: #93C5FD; background: #EFF6FF; }
.vm-doc-icon.form { color: #7C3AED; border-color: #C4B5FD; background: #F5F3FF; }
.vm-doc-icon.link { color: #059669; border-color: #6EE7B7; background: #ECFDF5; }
.vm-doc-icon.vid  { color: #EA580C; border-color: #FDBA74; background: #FFF7ED; }
.vm-doc-icon.ppt  { color: #C2410C; border-color: #FDBA74; background: #FFF7ED; }
.vm-doc-body { flex: 1; min-width: 0; }
.vm-doc-title { font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 2px; line-height: 1.3; }
.vm-doc-meta { font-size: 12px; color: var(--ink-muted); }
.vm-doc-action { width: 36px; height: 36px; border-radius: 8px; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); flex-shrink: 0; transition: all 0.2s; }
.vm-doc:hover .vm-doc-action { background: var(--isfsc-red); border-color: var(--isfsc-red); color: #fff; }

.vm-lib-search { background: #fff; border: 2px solid var(--border); border-radius: 12px; padding: 4px 4px 4px 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; transition: border-color 0.2s; }
.vm-lib-search:focus-within { border-color: var(--isfsc-red); }
.vm-lib-search input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; padding: 10px 0; font-family: inherit; }
.vm-lib-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.vm-lib-filter { background: #fff; border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.vm-lib-filter:hover { border-color: var(--isfsc-red); color: var(--isfsc-red); text-decoration: none; }
.vm-lib-filter.is-active { background: var(--isfsc-red); border-color: var(--isfsc-red); color: #fff; }
.vm-lib-filter .count { background: rgba(0,0,0,0.06); padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.vm-lib-filter.is-active .count { background: rgba(255,255,255,0.25); }
.vm-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

.vm-cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.vm-cal-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.2s; }
.vm-cal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--isfsc-red); }
.vm-cal-month { font-size: 12px; font-weight: 700; color: var(--isfsc-red); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.vm-cal-event { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.vm-cal-date { font-size: 13px; color: var(--ink-muted); }

.vm-contact-card .vm-card-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--isfsc-red-light); margin-bottom: 12px; }

.vm-single { max-width: 800px; margin: 0 auto; padding: 64px 24px; }
.vm-single.vm-wide { max-width: 1100px; }
.vm-single h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.1; margin-bottom: 16px; letter-spacing: -1px; }
.vm-single-meta { color: var(--ink-muted); font-size: 14px; margin-bottom: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.vm-single-meta .vm-tag { background: var(--isfsc-red-light); color: var(--isfsc-red); padding: 4px 10px; border-radius: 6px; font-weight: 600; font-size: 12px; }
.vm-single-content { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.vm-single-content h2, .vm-single-content h3 { color: var(--ink); margin: 32px 0 12px; }
.vm-single-content p { margin-bottom: 16px; }
.vm-single-content ul, .vm-single-content ol { margin-bottom: 16px; padding-left: 24px; }
.vm-single-content a { color: var(--isfsc-red); }

.vm-download-card { background: linear-gradient(135deg, var(--isfsc-red-light) 0%, #FFF5F5 100%); border: 2px solid var(--isfsc-red); border-radius: var(--radius-lg); padding: 32px; margin: 32px 0; text-align: center; }
.vm-download-card h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--ink); }
.vm-download-card p { color: var(--ink-soft); margin-bottom: 20px; }
.vm-btn-download { background: var(--isfsc-red); color: #fff; padding: 14px 28px; border-radius: 10px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; font-size: 16px; transition: all 0.2s; }
.vm-btn-download:hover { background: var(--isfsc-red-dark); color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.vm-back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 14px; font-weight: 500; margin-bottom: 24px; }
.vm-back-link:hover { color: var(--isfsc-red); text-decoration: none; }

.vm-footer { background: #0F0F0F; color: #ccc; padding: 56px 24px 32px; margin-top: 80px; }
.vm-footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.vm-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; font-weight: 700; }
.vm-footer ul { list-style: none; }
.vm-footer li { margin-bottom: 8px; list-style: none; }
.vm-footer a { color: #aaa; font-size: 14px; }
.vm-footer a:hover { color: #fff; }
.vm-footer-brand p { font-size: 14px; line-height: 1.6; color: #999; margin-bottom: 16px; }
.vm-footer-bottom { max-width: 1200px; margin: 40px auto 0; padding-top: 24px; border-top: 1px solid #2a2a2a; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 13px; color: #777; }

.vm-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.vm-reveal.in { opacity: 1; transform: translateY(0); }
.vm-reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.vm-reveal-stagger.in > *:nth-child(1) { transition-delay: 0.00s; }
.vm-reveal-stagger.in > *:nth-child(2) { transition-delay: 0.05s; }
.vm-reveal-stagger.in > *:nth-child(3) { transition-delay: 0.10s; }
.vm-reveal-stagger.in > *:nth-child(4) { transition-delay: 0.15s; }
.vm-reveal-stagger.in > *:nth-child(5) { transition-delay: 0.20s; }
.vm-reveal-stagger.in > *:nth-child(6) { transition-delay: 0.25s; }
.vm-reveal-stagger.in > *:nth-child(7) { transition-delay: 0.30s; }
.vm-reveal-stagger.in > *:nth-child(8) { transition-delay: 0.35s; }
.vm-reveal-stagger.in > * { opacity: 1; transform: translateY(0); }

@keyframes vm-fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.vm-hero-badge { animation: vm-fade-up 0.7s 0.05s both cubic-bezier(0.16, 1, 0.3, 1); }
.vm-hero h1   { animation: vm-fade-up 0.7s 0.15s both cubic-bezier(0.16, 1, 0.3, 1); }
.vm-hero-sub  { animation: vm-fade-up 0.7s 0.25s both cubic-bezier(0.16, 1, 0.3, 1); }
.vm-search    { animation: vm-fade-up 0.7s 0.35s both cubic-bezier(0.16, 1, 0.3, 1); }
.vm-search-hints { animation: vm-fade-up 0.7s 0.45s both cubic-bezier(0.16, 1, 0.3, 1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .vm-reveal, .vm-reveal-stagger > * { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  .vm-header-inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .vm-nav { justify-content: center; }
  .vm-hero { padding: 40px 20px 32px; }
  .vm-social-banner { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
  .vm-urgences { padding: 28px; }
  .vm-section { padding: 48px 20px; }
  .vm-footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--ink-muted); text-align: center; padding: 8px; }
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
