/*
Responsabilité : Feuille de style éco-conçue pour le portail de cours DIIAGE / IDfr.
Dépendances : Aucune dépendance externe (0 police distante, système CSS natif).
Mots-clés : style, responsive, IDfr, cartes de téléchargement, Jour 1, Jour 2.
*/

:root {
  --color-primary: #0f172a;
  --color-secondary: #0369a1;
  --color-secondary-hover: #0284c7;
  --color-text: #334155;
  --color-muted: #64748b;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.brand-logo {
  height: 50px;
  width: auto;
  display: block;
}

.header-tag {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-secondary);
  background: #e0f2fe;
  padding: 6px 14px;
  border-radius: 999px;
}

/* Main & Hero */
.main-content {
  flex: 1;
  padding-top: 40px;
  padding-bottom: 64px;
}

.hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 44px auto;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.05rem;
  color: var(--color-muted);
}

/* Day Sections */
.day-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.day-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.day-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 8px;
}

.day-pill.active {
  background: var(--color-primary);
  color: #ffffff;
}

.day-pill.upcoming {
  background: #e2e8f0;
  color: #475569;
}

.day-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
}

.day-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
}

/* Cards Grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 22px;
  background: #ffffff;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.resource-card:hover {
  transform: translateY(-2px);
  border-color: #94a3b8;
  box-shadow: 0 8px 16px -4px rgba(15, 23, 42, 0.08);
}

.resource-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.resource-icon.pptx {
  background: #fff7ed;
  color: #ea580c;
}

.resource-icon.excel {
  background: #ecfdf5;
  color: #059669;
}

.resource-icon.word {
  background: #eff6ff;
  color: #2563eb;
}

.resource-body {
  flex: 1;
}

.resource-meta {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.resource-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.resource-body p {
  font-size: 0.92rem;
  color: var(--color-text);
  margin-bottom: 20px;
}

.resource-footer {
  margin-top: auto;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: var(--color-secondary);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.btn-download:hover {
  background: var(--color-secondary-hover);
}

/* Jour 2 - Upcoming */
.day-status-badge {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  padding: 4px 12px;
  border-radius: 999px;
}

.upcoming-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: var(--color-bg);
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}

.upcoming-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upcoming-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.upcoming-box p {
  font-size: 0.92rem;
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 20px 0;
  font-size: 0.88rem;
  color: var(--color-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-inner a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-inner a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 14px 20px;
  }
}
