/* Styles de la page Annonces & Sujets de Projets */

/* Header Hero */
.annonces-hero {
  background: linear-gradient(135deg, #0B2447 0%, #17486f 50%, #1B6B82 100%);
  color: #fff;
  padding: 60px 0 50px;
  position: relative;
  overflow: hidden;
}

.annonces-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 45px solid rgba(28, 200, 216, 0.16);
  pointer-events: none;
}

.annonces-hero .hero-pill {
  display: inline-block;
  background: rgba(28, 200, 216, 0.2);
  color: #55e6f5;
  border: 1px solid rgba(28, 200, 216, 0.4);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.annonces-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.annonces-hero p {
  max-width: 68ch;
  color: #cde1ef;
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.annonces-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.annonces-hero-actions a.highlight {
  background: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
  font-weight: 700;
}

.annonces-hero-actions a.highlight:hover {
  background: #3ce5f5;
  color: var(--navy);
}

/* SECTION SUJETS DE PROJETS (LA PARTIE LA PLUS IMPORTANTE) */
.sujets-section {
  padding: 65px 0 80px;
  background: #f8fbfe;
  border-bottom: 1px solid var(--line);
}

.sujets-header-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}

.sujets-badge-important {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e1f4fc;
  color: var(--teal);
  border: 1px solid #bce1f1;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Barre de filtres pour sujets */
.sujets-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 4px 16px rgba(11, 36, 71, 0.03);
}

.sujets-search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 380px;
}

.sujets-search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbfe;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.sujets-search-box input:focus {
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 107, 130, 0.12);
}

.sujets-search-box span.icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.sujets-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sujet-pill-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fbfe;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sujet-pill-btn:hover {
  border-color: var(--teal);
  color: var(--navy);
}

.sujet-pill-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* Grille des sujets */
.sujets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 26px;
}

.sujet-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(16, 43, 78, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.sujet-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(16, 43, 78, 0.09);
}

.sujet-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 4px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
}

.sujet-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-top: 6px;
}

.sujet-status-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sujet-status-badge.open {
  background: #eafaf1;
  color: #219653;
  border: 1px solid #b7ebd0;
}

.sujet-status-badge.forming {
  background: #fff8e6;
  color: #b7791f;
  border: 1px solid #fed7aa;
}

.sujet-target-master {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--teal);
  background: #eaf3f8;
  padding: 3px 9px;
  border-radius: 6px;
}

.sujet-card h3 {
  font-size: 1.22rem;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.35;
}

.sujet-desc {
  font-size: 0.91rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.sujet-deliverables {
  background: #f6fafd;
  border: 1px solid #e1eff8;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.84rem;
  color: #3b566e;
  margin-bottom: 16px;
}

.sujet-deliverables strong {
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}

.sujet-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.sujet-tech-tags span {
  background: #ffffff;
  color: var(--teal);
  border: 1px solid #d5e5f0;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.sujet-meta-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid #edf4f8;
  margin-bottom: 16px;
}

.sujet-meta-info strong {
  color: var(--navy);
}

.sujet-actions {
  display: flex;
  gap: 10px;
}

.btn-apply-sujet {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-apply-sujet:hover {
  background: var(--teal);
  transform: translateY(-1px);
}

.btn-details-sujet {
  padding: 10px 14px;
  border-radius: 10px;
  background: #eef5fb;
  color: var(--navy);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-details-sujet:hover {
  background: #e0eef8;
}

/* SECTION ANNONCES & NEWS */
.news-section {
  padding: 70px 0;
  background: #ffffff;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.news-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(11, 36, 71, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(11, 36, 71, 0.08);
}

.news-header-banner {
  padding: 14px 20px;
  background: #f5f9fd;
  border-bottom: 1px solid #e8f1f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-type-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.news-type-pill.workshop {
  background: #e6f7ff;
  color: #0077b6;
  border: 1px solid #bae7ff;
}

.news-type-pill.event {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}

.news-type-pill.announcement {
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
}

.news-date {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.news-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-body h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.35;
}

.news-body p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.news-details-box {
  background: #fafcfe;
  border: 1px solid #eaf2f8;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.83rem;
  color: #486581;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-news-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  background: #eef6fc;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-news-action:hover {
  background: var(--blue);
  color: #fff;
}

/* MODALES CANDIDATURE & PROPOSITION */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 36, 71, 0.6);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #ffffff;
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(11, 36, 71, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f4f8;
  border: none;
  font-size: 1.2rem;
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s ease;
}

.modal-close-btn:hover {
  background: #e2ecf5;
}

.modal-header {
  padding: 26px 28px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.modal-header p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.modal-content-form {
  padding: 24px 28px 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--navy);
  background: #f8fbfe;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 107, 130, 0.12);
}

.modal-status-msg {
  min-height: 1.4em;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 10px;
}

.modal-status-msg.success {
  color: #27ae60;
}

.modal-status-msg.error {
  color: #c0392b;
}

/* Responsive */
@media (max-width: 768px) {
  .sujets-grid, .news-grid {
    grid-template-columns: 1fr;
  }
  .sujets-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .sujets-search-box {
    max-width: none;
  }
}
