/* ══════════════════════════════════════════════════════
   RESSOURCES.CSS — Styles spécifiques à la page Ressources & Blog
   ══════════════════════════════════════════════════════ */

/* ── HERO ── */
.hero { padding: 5rem 2rem 3rem; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 80% 40%, rgba(74,115,84,0.12) 0%, transparent 70%), radial-gradient(ellipse 50% 60% at 20% 80%, rgba(192,90,40,0.08) 0%, transparent 60%); pointer-events: none; }
.hero-inner { max-width: 700px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; margin-bottom: 0.6rem; }
.hero-desc { font-size: 1rem; color: var(--text-mid); max-width: 550px; margin: 0 auto 1rem; line-height: 1.8; }
.hero-message { background: var(--green-pale); border-left: 3px solid var(--green); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; text-align: left; font-size: 0.9rem; color: var(--text); line-height: 1.7; max-width: 550px; margin: 0 auto; }
.hero-message strong { color: var(--green); }

/* ── SECTIONS ── */
section { padding: 4rem 2rem; }
.section-inner { max-width: 960px; margin: 0 auto; }
.section-label { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-light); margin-bottom: 0.6rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 0.5rem; font-weight: 700; }
.section-subtitle { font-size: 0.92rem; color: var(--text-mid); margin-bottom: 2rem; }
.divider { width: 44px; height: 3px; background: var(--terra); border-radius: 2px; margin-bottom: 1.25rem; }

/* ── ANNUAIRE ── */
#annuaire { background: var(--bg-dark); color: #fff; }
#annuaire .section-label { color: rgba(255,255,255,0.4); }
#annuaire .section-title { color: #fff; }
#annuaire .section-subtitle { color: rgba(255,255,255,0.5); }
.category-group { margin-bottom: 2.5rem; }
.category-title { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.resources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.resource-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 1.2rem; transition: transform 0.2s, background 0.2s; }
.resource-card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.09); }
.resource-card .res-name { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; color: #fff; margin-bottom: 0.2rem; }
.resource-card .res-name a { color: #fff; text-decoration: none; }
.resource-card .res-name a:hover { text-decoration: underline; }
.resource-card .res-img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: 0.8rem; }
.resource-card .res-desc { font-size: 0.82rem; color: rgba(255,255,255,0.5); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resource-card .res-link { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--terra); margin-top: 0.5rem; text-decoration: none; }
.resource-card .res-link:hover { text-decoration: underline; }
.empty-resources { color: rgba(255,255,255,0.35); font-style: italic; font-family: 'Playfair Display', serif; }
.btn-suggest-resource { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1.2rem; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; color: rgba(255,255,255,0.8); font-size: 0.85rem; font-weight: 500; font-family: 'DM Sans', sans-serif; background: none; cursor: pointer; transition: all 0.2s; margin-top: 1rem; }
.btn-suggest-resource:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: #fff; }

/* ── AUTEUR·ICES : carte portrait ── */
#cat-auteurices .resources-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
#cat-auteurices .resource-card { text-align: center; padding: 1rem; }
#cat-auteurices .res-img { width: 130px; height: 180px; object-fit: cover; border-radius: 8px; margin: 0 auto 0.8rem; display: block; }
#cat-auteurices .res-desc { -webkit-line-clamp: 3; }

/* ── BIBLIOGRAPHIE ── */
.biblio-section { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.biblio-title { font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 0.75rem; }
.biblio-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.biblio-item { display: flex; gap: 0.75rem; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.biblio-cover { width: 60px; height: 85px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--border); }
.biblio-info { flex: 1; min-width: 0; }
.biblio-book-title { font-family: 'Playfair Display', serif; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.15rem; }
.biblio-book-desc { font-size: 0.8rem; color: var(--text-mid); line-height: 1.5; }
.biblio-add-form { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; padding: 0.75rem; background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; }
.biblio-add-form input, .biblio-add-form textarea { padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; background: var(--bg-card); color: var(--text); outline: none; }
.biblio-add-form input:focus, .biblio-add-form textarea:focus { border-color: var(--green); }
.biblio-add-form textarea { resize: vertical; min-height: 50px; }
.btn-biblio-add { align-self: flex-start; padding: 0.35rem 0.8rem; background: var(--green); color: #fff; border: none; border-radius: 999px; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; cursor: pointer; }
.btn-biblio-add:hover { background: #3a5e43; }
.btn-biblio-remove { background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 0.75rem; align-self: flex-start; padding: 0.1rem; }
.btn-biblio-remove:hover { color: #c0392b; }

/* ── SOMMAIRE ANNUAIRE ── */
.annuaire-toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.annuaire-toc a { padding: 0.35rem 0.8rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; color: rgba(255,255,255,0.7); font-size: 0.8rem; font-weight: 500; text-decoration: none; transition: all 0.2s; white-space: nowrap; }
.annuaire-toc a:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: #fff; }

/* ── RECHERCHE ADMIN ── */
.admin-search { width: 100%; padding: 0.45rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.85rem; background: var(--bg); color: var(--text); outline: none; margin-bottom: 0.75rem; }
.admin-search:focus { border-color: var(--green); }

/* ── RESEAUX SOCIAUX ── */
.social-tag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; font-size: 0.78rem; margin: 0.2rem; }
.social-tag button { background: none; border: none; cursor: pointer; color: var(--text-light); font-size: 0.75rem; padding: 0; margin-left: 0.2rem; }
.social-tag button:hover { color: #c0392b; }
.social-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.social-link { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.7rem; background: var(--green-pale); border: 1px solid var(--green); border-radius: 999px; color: var(--green); font-size: 0.78rem; font-weight: 500; text-decoration: none; transition: all 0.2s; }
.social-link:hover { background: var(--green); color: #fff; }

/* ── BLOG ── */
#blog { background: var(--bg); }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.article-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s; cursor: pointer; }
.article-card:hover { transform: translateY(-3px); }
.article-card-img { width: 100%; height: 180px; object-fit: cover; background: var(--border); }
.article-card-body { padding: 1.25rem; }
.article-card-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--text); }
.article-card-meta { font-size: 0.76rem; color: var(--text-light); margin-bottom: 0.6rem; }
.article-card-excerpt { font-size: 0.85rem; color: var(--text-mid); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty-articles { color: var(--text-light); font-style: italic; font-family: 'Playfair Display', serif; text-align: center; padding: 2rem; }
.btn-write-article { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.3rem; background: var(--green); color: #fff; border: none; border-radius: 999px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.btn-write-article:hover { background: #3a5e43; }
.blog-actions { display: flex; justify-content: center; margin-bottom: 2rem; gap: 1rem; }

/* ── ARTICLE MODAL ── */
.article-modal { position: fixed; inset: 0; z-index: 500; background: rgba(42,32,22,0.5); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; }
.article-modal.hidden { display: none; }
.article-modal-content { background: var(--bg-card); border-radius: var(--radius); max-width: 720px; width: 100%; padding: 2rem; position: relative; box-shadow: 0 8px 40px rgba(42,32,22,0.2); margin-top: 2rem; }
.article-modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-light); z-index: 1; }
.article-modal-close:hover { color: var(--text); }
.article-modal-img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 8px; margin-bottom: 1.5rem; }
.article-modal-title { font-size: 1.6rem; margin-bottom: 0.3rem; }
.article-modal-meta { font-size: 0.82rem; color: var(--text-light); margin-bottom: 1.5rem; }
.btn-edit-inline { background: none; border: 1px solid var(--border); padding: 0.15rem 0.5rem; border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; color: var(--green); cursor: pointer; transition: all 0.15s; }
.btn-edit-inline:hover { background: var(--green-pale); border-color: var(--green); }
.article-modal-body { font-size: 0.95rem; line-height: 1.8; color: var(--text); }
.article-modal-body p { margin-bottom: 1rem; }
.article-modal-body a { color: var(--green); text-decoration: underline; }
.article-inline-img { max-width: 100%; border-radius: 8px; margin: 1rem auto; display: block; }
.article-modal-body p:empty { display: none; }
.comments-section { margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.comments-title { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-mid); }
.comment { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-meta { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.2rem; }
.comment-meta strong { color: var(--text-mid); font-weight: 600; }
.comment-text { font-size: 0.85rem; color: var(--text); line-height: 1.55; }
.comment-delete { background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 0.72rem; margin-left: 0.4rem; }
.comment-delete:hover { color: #c0392b; }
.comment-form { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.comment-form textarea { flex: 1; padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.85rem; resize: none; min-height: 60px; background: var(--bg); color: var(--text); outline: none; }
.comment-form textarea:focus { border-color: var(--green); }
.comment-form button { align-self: flex-end; padding: 0.45rem 0.9rem; background: var(--green); color: #fff; border: none; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; cursor: pointer; white-space: nowrap; }
.comment-form button:hover { background: #3a5e43; }
.comment-login { text-align: center; padding: 0.75rem; font-size: 0.82rem; color: var(--text-light); font-style: italic; }

/* ── FORMS (suggest resource / write article) ── */
.form-modal { position: fixed; inset: 0; z-index: 600; background: rgba(42,32,22,0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.form-modal.hidden { display: none; }
.form-modal-content { background: var(--bg-card); border-radius: var(--radius); padding: 2rem; max-width: 500px; width: 100%; position: relative; box-shadow: 0 8px 40px rgba(42,32,22,0.2); max-height: 90vh; overflow-y: auto; }
.form-modal-content h2 { font-size: 1.2rem; margin-bottom: 1.25rem; }
.form-modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-light); }
.form-modal-close:hover { color: var(--text); }
.editor-toolbar { display: flex; gap: 0.4rem; margin-bottom: 0.4rem; }
.editor-toolbar button { padding: 0.35rem 0.7rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; cursor: pointer; color: var(--text-mid); transition: all 0.15s; }
.editor-toolbar button:hover { border-color: var(--green); color: var(--green); }
.img-preview-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.img-preview-bar img { height: 50px; border-radius: 4px; object-fit: cover; }
.field-hint { font-size: 0.75rem; color: var(--text-light); margin-top: 0.25rem; }

/* ── RESOURCE MODAL ── */
.resource-modal { position: fixed; inset: 0; z-index: 500; background: rgba(42,32,22,0.5); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; }
.resource-modal.hidden { display: none; }
.resource-modal-content { background: var(--bg-card); border-radius: var(--radius); max-width: 540px; width: 100%; padding: 2rem; position: relative; box-shadow: 0 8px 40px rgba(42,32,22,0.2); margin: auto 0; }
.resource-modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-light); z-index: 1; }
.resource-modal-close:hover { color: var(--text); }
.resource-modal-img { width: 100%; max-height: 250px; object-fit: cover; border-radius: 8px; margin-bottom: 1.25rem; }
.resource-modal-name { font-size: 1.3rem; margin-bottom: 0.3rem; }
.resource-modal-cat { font-size: 0.82rem; color: var(--text-light); margin-bottom: 1rem; }
.resource-modal-desc { font-size: 0.92rem; color: var(--text); line-height: 1.7; margin-bottom: 1rem; }
.resource-modal-address { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.8rem; background: var(--green-pale); border-radius: 8px; margin-bottom: 1rem; font-size: 0.88rem; color: var(--text); }
.resource-modal-address .addr-icon { font-size: 1.1rem; flex-shrink: 0; }
.btn-maps { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.9rem; background: var(--green); color: #fff; border: none; border-radius: 999px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; cursor: pointer; text-decoration: none; transition: background 0.2s; margin-top: 0.4rem; }
.btn-maps:hover { background: #3a5e43; }
.resource-modal-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── ADMIN RESSOURCES ── */
.admin-item { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem; margin-bottom: 0.6rem; }
.admin-item-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.15rem; }
.admin-item-meta { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.4rem; }
.admin-item-desc { font-size: 0.82rem; color: var(--text-mid); line-height: 1.5; margin-bottom: 0.5rem; }
.admin-item-actions { display: flex; gap: 0.4rem; }
.admin-item-actions button { padding: 0.3rem 0.7rem; border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; cursor: pointer; border: 1px solid var(--border); background: none; color: var(--text-mid); transition: all 0.15s; }
.admin-empty { font-size: 0.82rem; color: var(--text-light); font-style: italic; }

/* ══════════════════════════════════════════════════════
   ÉVÉNEMENTS EXTÉRIEURS
   ══════════════════════════════════════════════════════ */

#evenements { background: var(--bg-dark); color: #fff; }
#evenements .section-label { color: rgba(255,255,255,0.4); }
#evenements .section-title { color: #fff; }
#evenements .section-subtitle { color: rgba(255,255,255,0.5); }
#evenements .divider { background: rgba(255,255,255,0.15); }

/* ── Grille événements ── */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }

/* ── Carte événement ── */
.event-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform 0.2s, background 0.2s; }
.event-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.09); }
.event-card-img { width: 100%; height: 160px; object-fit: cover; }
.event-card-body { display: flex; gap: 1rem; padding: 1.25rem; }
.event-card-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; padding: 0.4rem 0.5rem; background: var(--terra); border-radius: 8px; flex-shrink: 0; }
.event-day { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1; }
.event-month { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.8); }
.event-card-info { flex: 1; min-width: 0; }
.event-card-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 0.25rem; }
.event-card-meta { font-size: 0.76rem; color: rgba(255,255,255,0.4); margin-bottom: 0.5rem; }
.event-card-excerpt { font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-recap-badge { display: inline-block; margin-top: 0.4rem; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600; background: var(--green-pale); color: var(--green); }

/* Événement passé : légèrement estompé */
.event-card.event-past { opacity: 0.65; }
.event-card.event-past:hover { opacity: 0.85; }
.event-card.event-past .event-card-date { background: var(--text-light); }

/* ── Modale événement ── */
.event-modal-content .event-modal-date-block { margin-bottom: 0.75rem; }
.event-modal-date { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; color: var(--terra); }
.event-modal-address { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.8rem; background: var(--green-pale); border-radius: 8px; margin-bottom: 1.25rem; font-size: 0.88rem; color: var(--text); }
.event-modal-address .addr-icon { font-size: 1.1rem; flex-shrink: 0; }
.event-modal-section { margin-bottom: 1.5rem; }
.event-modal-section-title { font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }

/* ── Formulaire événement ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }

/* ── Bouton événement (fond sombre) ── */
#evenements .btn-add-event { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); color: rgba(255,255,255,0.8); }
#evenements .btn-add-event:hover { background: var(--green); border-color: var(--green); color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .resources-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
