/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:      #E3001B;
  --red-dark: #B0001A;
  --black:    #1A1A1A;
  --white:    #FFFFFF;
  --off-white:#F8F7F5;
  --gray-100: #EEECE9;
  --gray-200: #D8D5D0;
  --gray-500: #767370;
  --font-display: 'Libre Franklin', system-ui, sans-serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --radius:   4px;
  --max-w:    1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--off-white);
  line-height: 1.6;
  font-size: 1rem;
}

body.modal-open { overflow: hidden; }

a { color: inherit; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--black);
  border-bottom: 3px solid var(--red);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0.4rem 1.5rem;
  min-height: 60px; display: flex; align-items: center; justify-content: space-between;
  background: var(--black);
}
.header-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-company { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; color: var(--white); letter-spacing: 0.01em; line-height: 1; align-self: center; }
.header-nav { display: flex; gap: 2rem; }
.header-nav a { color: var(--gray-200); text-decoration: none; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; transition: color 0.15s; }
.header-nav a:hover { color: var(--red); }

/* ===== HERO ===== */
.hero { background: var(--black); color: var(--white); padding: 5rem 1.5rem; position: relative; overflow: hidden; }
.hero-inner { max-width: var(--max-w); margin: 0 auto; position: relative; z-index: 1; }
.hero-eyebrow { font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--red); margin-bottom: 1.5rem; }
.hero-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.8rem, 7vw, 5.5rem); line-height: 1.0; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.hero-sub { font-size: 1.15rem; color: var(--gray-200); max-width: 540px; margin-bottom: 2.5rem; line-height: 1.7; }
.hero-stripe { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; background: var(--red); }

/* ===== BOUTON PRINCIPAL ===== */
.btn-primary {
  display: inline-block; background: var(--red); color: var(--white);
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  padding: 0.85rem 2rem; border-radius: var(--radius);
  transition: background 0.15s, transform 0.1s;
  border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }

/* ===== SECTIONS ===== */
.section { padding: 5rem 1.5rem; }
.section--alt { background: var(--gray-100); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-inner--narrow { max-width: 700px; }
.section-label { font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); margin-bottom: 0.75rem; }
.section-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 2.5rem; }
.section-intro { color: var(--gray-500); max-width: 600px; margin-bottom: 2.5rem; font-size: 1.05rem; }

/* ===== CARDS (démarche) ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.card { background: var(--white); border-radius: var(--radius); padding: 2rem 1.75rem; border-left: 4px solid var(--red); }
.card-icon { font-size: 1.8rem; margin-bottom: 1rem; }
.card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-bottom: 0.6rem; }
.card p { color: var(--gray-500); font-size: 0.95rem; line-height: 1.6; }

/* ===== THEMES GRID ===== */
.themes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.loading-msg { color: var(--gray-500); font-style: italic; }

.theme-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-200); }

.theme-header {
  background: var(--black); color: var(--white);
  padding: 1rem 1.5rem; display: flex; align-items: center; gap: 0.75rem;
  cursor: pointer; user-select: none; border-left: 4px solid var(--red);
  transition: background 0.15s;
}
.theme-header:hover { background: #2a2a2a; }
.theme-icon { font-size: 1.2rem; }
.theme-name { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; flex: 1; }
.theme-count { font-size: 0.8rem; color: var(--gray-500); background: #333; padding: 0.15rem 0.5rem; border-radius: 20px; }
.theme-toggle { font-size: 0.7rem; color: var(--gray-500); transition: transform 0.2s; }
.theme-toggle.open { transform: rotate(180deg); }

/* ===== LISTE DE FICHIERS ===== */
.file-list { list-style: none; display: none; padding: 0.5rem 0; }
.file-list.open { display: block; }

.file-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.1s;
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--gray-100); }

/* Thumbnail */
.file-thumb {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: var(--radius); flex-shrink: 0;
  border: 1px solid var(--gray-200);
}

.file-type-icon { font-size: 1.4rem; flex-shrink: 0; width: 52px; text-align: center; }

.file-info { flex: 1; min-width: 0; }

.file-name {
  display: block; font-weight: 600; font-size: 0.9rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.file-meta { font-size: 0.78rem; color: var(--gray-500); }

.file-resume {
  display: block; font-size: 0.82rem; color: var(--gray-500);
  margin-top: 0.25rem; line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Boutons d'action */
.file-actions { display: flex; flex-direction: column; gap: 0.4rem; flex-shrink: 0; align-items: flex-end; }

.btn-preview {
  font-size: 0.75rem; font-weight: 700; color: var(--black);
  background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 0.28rem 0.55rem;
  cursor: pointer; white-space: nowrap; letter-spacing: 0.03em;
  transition: background 0.12s, border-color 0.12s;
  font-family: var(--font-body);
}
.btn-preview:hover { background: var(--gray-200); border-color: var(--gray-500); }

.file-download {
  font-size: 0.75rem; font-weight: 700; color: var(--red);
  text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.28rem 0.55rem; border: 1px solid var(--red);
  border-radius: var(--radius); white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.file-download:hover { background: var(--red); color: var(--white); }

.theme-empty { padding: 1rem 1.5rem; color: var(--gray-500); font-size: 0.88rem; font-style: italic; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--white);
  border-radius: 6px;
  max-width: 600px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  border-top: 4px solid var(--red);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: var(--gray-100); border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 0.85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s; color: var(--black);
}
.modal-close:hover { background: var(--gray-200); }

.modal-illustration img {
  width: 100%; max-height: 260px; object-fit: cover;
  display: block;
}

.modal-body { padding: 1.75rem 2rem 2rem; }

.modal-eyebrow { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 0.5rem; }

.modal-title { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; line-height: 1.2; margin-bottom: 1rem; padding-right: 2rem; }

.modal-resume { color: var(--black); font-size: 0.98rem; line-height: 1.7; margin-bottom: 1.5rem; }

.modal-resume--empty { color: var(--gray-500); font-style: italic; }

.modal-download { display: inline-block; }

/* ===== CONTACT ===== */
.contact-block { background: var(--gray-100); border-radius: var(--radius); padding: 2rem; border-left: 4px solid var(--red); margin-top: 2rem; }
.contact-email { display: block; font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: var(--red); text-decoration: none; margin-bottom: 0.75rem; }
.contact-email:hover { color: var(--red-dark); }
.contact-note { color: var(--gray-500); font-size: 0.95rem; }

/* ===== FOOTER ===== */
.site-footer { background: var(--black); color: var(--gray-500); padding: 1.5rem; text-align: center; font-size: 0.85rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-weight: 700; color: var(--white); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .header-nav { gap: 1rem; }
  .header-nav a { font-size: 0.78rem; }
  .hero { padding: 3rem 1.25rem; }
  .section { padding: 3.5rem 1.25rem; }
  .cards, .themes-grid { grid-template-columns: 1fr; }
  .file-item { flex-wrap: wrap; }
  .file-actions { flex-direction: row; width: 100%; justify-content: flex-start; margin-top: 0.25rem; padding-left: calc(52px + 0.75rem); }
  .modal-body { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== LOGO HEADER ===== */
.header-logo {
  height: 80px;
  width: auto;
  display: block;
  flex-shrink: 0;
  border-radius: 2px;
}
