/* ============================================
   COMPOSANTS GÉNÉRÉS PAR JAVASCRIPT
   ============================================ */

/* --- ICÔNES SVG GÉNÉRIQUES --- */
.bts-objectif-icon svg,
.skill-logo-icon svg,
.project-icon svg,
.cert-timeline-icon svg,
.veille-item-date svg,
.veille-source-badge svg {
  width: 14px;
  height: 14px;
}

.bts-objectif-icon,
.skill-logo-icon,
.project-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.project-icon {
  margin-bottom: 1rem;
}

/* --- VEILLE TECHNOLOGIQUE --- */
.veille-feed {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.veille-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--text-primary);
  font-family: var(--font-sans);
}

.veille-live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--accent);
}

.veille-live-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(211, 63, 51, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(211, 63, 51, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(211, 63, 51, 0); }
}

.veille-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.veille-item {
  position: relative;
  display: flex;
  text-decoration: none;
  color: inherit;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  transition: all 0.2s ease;
  overflow: hidden;
}

.veille-item:hover {
  background-color: var(--bg-card-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.veille-item-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.source--red { background-color: var(--accent); color: var(--accent); }
.source--blue { background-color: #3b82f6; color: #3b82f6; }
.source--orange { background-color: #f59e0b; color: #f59e0b; }
.source--green { background-color: #10b981; color: #10b981; }

.veille-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1rem;
}

.veille-item-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.veille-source-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(0,0,0,0.05);
  border-radius: 0;
  font-weight: 600;
  text-transform: uppercase;
}

.veille-source-badge svg {
  width: 12px;
  height: 12px;
}

.veille-item-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
}

.veille-new-badge {
  background-color: var(--accent);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 0;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

.veille-item-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* --- BTS SIO --- */
.bts-intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  font-size: 1.1rem;
}

.bts-objectifs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.bts-objectif-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.bts-objectif-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.bts-objectif-card h4 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

/* --- COMPETENCES TABLE --- */
.comp-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comp-table th, .comp-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.comp-table th {
  background: var(--text-primary);
  color: var(--bg-card);
  font-family: var(--font-serif);
  font-weight: 600;
}

.comp-niveau {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--niveau-color, var(--text-primary));
  color: var(--niveau-color, var(--text-primary));
  background: rgba(0,0,0,0.02);
  font-size: 0.85rem;
  font-weight: bold;
}

.comp-preuve {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* --- ARBRE DES CERTIFICATIONS --- */
.cert-timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border-subtle);
  margin-top: 2rem;
}

.cert-timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.cert-timeline-item::before {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: 1.5rem;
  width: 14px;
  height: 14px;
  background: var(--bg-dark);
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.cert-timeline-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--text-primary);
}

.cert-timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .cert-timeline-content {
    flex-direction: column;
    gap: 1rem;
  }
}

.cert-timeline-body {
  flex-grow: 1;
}

.cert-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* --- GRILLE OPENCLASSROOMS --- */
.oc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cert-timeline-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.cert-timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- MODALE PROJET (AFFICHAGE PDF) --- */
.project-modal-layout {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  height: 60vh;
  min-height: 400px;
}

@media (max-width: 768px) {
  .project-modal-layout {
    flex-direction: column;
    height: auto;
  }
}

.project-modal-sidebar {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-right: 1px solid var(--border-subtle);
  padding-right: 1rem;
}

@media (max-width: 768px) {
  .project-modal-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-right: 0;
    padding-bottom: 1rem;
  }
}

.pdf-selection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.pdf-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.pdf-btn:hover {
  background: var(--bg-card-hover);
}

.pdf-btn.active {
  background: var(--bg-dark);
  color: var(--bg-main);
  border-color: var(--text-primary);
}

.pdf-btn-icon svg {
  width: 16px;
  height: 16px;
}

.project-modal-main {
  flex-grow: 1;
  background: #f0f0f0;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  overflow: hidden;
}

/* --- PAGE CONTACT --- */
.contact-missions {
  margin: 3rem 0;
}

.contact-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.contact-title-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.mission-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  transition: transform 0.2s;
}

.mission-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.mission-icon {
  color: var(--accent);
}

.mission-card h4 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  margin: 0;
}

.mission-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .contact-buttons {
    flex-direction: column;
  }
}
