/* SIIMEA Articles – Public Styles v1.3.0 */
.siimea-articles-grid {
  display: grid;
  gap: 28px;
  margin: 20px 0;
}

.siimea-articles-grid[data-columns="1"] { grid-template-columns: 1fr; }
.siimea-articles-grid[data-columns="2"] { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.siimea-articles-grid[data-columns="3"] { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.siimea-articles-grid[data-columns="4"] { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

@media (max-width: 768px) {
  .siimea-articles-grid { grid-template-columns: 1fr !important; }
}

/* Carte article */
.siimea-article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.siimea-article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Média */
.siimea-article-media {
  width: 100%;
  height: 220px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.siimea-grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.siimea-article-card:hover .siimea-grid-img {
  transform: scale(1.05);
}

.siimea-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.siimea-media-placeholder {
  color: #888;
  font-style: italic;
}

/* Contenu */
.siimea-article-content {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.siimea-article-content h3 {
  color: #254F8C;
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.siimea-article-date {
  font-size: 0.85rem;
  color: #666;
  margin: 6px 0;
  font-style: italic;
}

.siimea-article-content p {
  color: #444;
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
}

.siimea-grid-share {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.siimea-grid-share svg {
  transition: transform 0.2s;
}

.siimea-grid-share svg:hover {
  transform: scale(1.2);
}

/* === Modal === */
#siimea-article-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.88);
  display: none;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}

.siimea-modal-wrapper {
  max-width: 900px;
  width: 100%;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 30px;
  margin: 20px auto;
  position: relative;
  max-height: none;
}

.siimea-modal-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}

.siimea-modal-header h2 {
  color: #254F8C;
  margin: 0;
  font-size: 1.8rem;
}

.siimea-modal-close {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #254F8C;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.siimea-modal-close:hover {
  background: #f0f7ff;
}

/* === Flèches de navigation PERSISTANTES === */
.siimea-modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(37, 79, 140, 0.92);
  color: white;
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  transition: background 0.2s, transform 0.2s;
}

.siimea-modal-nav:hover {
  background: rgba(26, 164, 90, 0.95);
  transform: translateY(-50%) scale(1.05);
}

.siimea-modal-prev { left: 20px; }
.siimea-modal-next { right: 20px; }

@media (max-width: 768px) {
  .siimea-modal-nav {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
  .siimea-modal-prev { left: 10px; }
  .siimea-modal-next { right: 10px; }
}

/* Média dans le popup */
.siimea-modal-media {
  margin-bottom: 24px;
  text-align: center;
}

.siimea-modal-img {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.siimea-modal-media iframe {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9;
  border-radius: 8px;
}

.siimea-modal-text {
  color: #333;
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Footer */
.siimea-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.siimea-like-btn {
  background: none;
  border: none;
  color: #254F8C;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.siimea-like-btn:hover,
.siimea-like-btn.liked {
  color: #1AA45A;
}

.siimea-share-box {
  display: flex;
  gap: 14px;
}

.siimea-share-box a {
  display: block;
  transition: transform 0.2s;
}

.siimea-share-box a:hover {
  transform: scale(1.15);
}

/* Body lock */
body.siimea-modal-open {
  overflow: hidden;
}

/* Bouton Charger plus */
.siimea-load-more {
  display: block;
  width: fit-content;
  margin: 30px auto 50px;
  padding: 12px 32px;
  background: #254F8C;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(37, 79, 140, 0.3);
}

.siimea-load-more:hover {
  background: #1AA45A;
  transform: translateY(-2px);
}

.siimea-load-more:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Elementor responsive */
@media (max-width: 1024px) {
  .siimea-elementor-grid[data-columns="3"],
  .siimea-elementor-grid[data-columns="4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}