/* ═══════════════════════════════════════════════════════════════
   BLOG & RESSOURCES — CSS dédié
   Utilise les variables CSS de style.css
   ═══════════════════════════════════════════════════════════════ */

/* ── SPINNER ── */
.blog-spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-right: .75rem;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.blog-loading, .article-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 2rem; color: var(--muted); font-size: .9rem;
}

.blog-error  { color: #e04000; text-align: center; padding: 3rem; }
.blog-empty  { color: var(--muted); text-align: center; padding: 3rem; font-size: .95rem; }

/* ── PAGE HERO (réutilisé blog + ressources) ── */
.page-hero--dark {
  background: var(--dark);
  padding: clamp(5rem,10vw,8rem) 0 clamp(3rem,6vw,5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero--dark::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(244,123,32,.12) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero--dark .page-hero__eyebrow {
  color: var(--accent); font-size: .75rem; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  display: inline-block; margin-bottom: 1rem;
}
.page-hero--dark .page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem,6vw,4rem); font-weight: 800;
  color: var(--white); line-height: 1.1; margin-bottom: 1rem;
}
.page-hero--dark .page-hero__title span { color: var(--accent); }
.page-hero--dark .page-hero__desc {
  font-size: clamp(.9rem,1.8vw,1rem); color: rgba(255,255,255,.65);
  max-width: 540px; margin: 0 auto 2rem; line-height: 1.7;
}

/* ── BARRE DE RECHERCHE ── */
.blog-search-wrap {
  position: relative; max-width: 480px; margin: 0 auto;
}
.blog-search {
  width: 100%; padding: .85rem 1rem .85rem 2.75rem;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.18);
  border-radius: var(--r-full); color: var(--white); font-size: .95rem;
  font-family: var(--font-body); transition: var(--ease); outline: none;
}
.blog-search::placeholder { color: rgba(255,255,255,.45); }
.blog-search:focus { background: rgba(255,255,255,.12); border-color: var(--accent); }
.blog-search__icon {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: rgba(255,255,255,.5); pointer-events: none;
}

/* ── BLOG LAYOUT (liste + sidebar) ── */
.blog-layout__inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 1024px) { .blog-layout__inner { grid-template-columns: 1fr; } }
.blog-layout__sidebar { position: sticky; top: 100px; }
@media (max-width: 1024px) { .blog-layout__sidebar { position: static; } }

/* ── BLOG CARDS ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}
.blog-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--ease), box-shadow var(--ease);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.09); }
.blog-card--animate { animation: fadeUp .5s both; }
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

.blog-card__thumb {
  display: block; aspect-ratio: 16/9;
  background: var(--dark) center/cover no-repeat;
  position: relative; overflow: hidden;
}
.blog-card__no-img {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 2rem; opacity: .4;
}
.blog-card__cat-badge {
  position: absolute; top: .75rem; left: .75rem;
  background: var(--accent); color: #fff;
  font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .28rem .65rem; border-radius: var(--r-full);
}
.blog-card__body { padding: 1.25rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card__meta { display: flex; gap: .5rem; align-items: center; font-size: .78rem; color: var(--muted); margin-bottom: .6rem; flex-wrap: wrap; }
.blog-card__title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin-bottom: .6rem; flex: 1; }
.blog-card__title a:hover { color: var(--accent); }
.blog-card__excerpt { font-size: .85rem; color: var(--muted); line-height: 1.65; margin-bottom: 1.2rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card__btn {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--accent); font-size: .85rem; font-weight: 600;
  transition: gap var(--ease);
}
.blog-card__btn:hover { gap: .7rem; }

/* ── PAGINATION ── */
.blog-pagination { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 2.5rem; }
.blog-pag__btn {
  padding: .5rem .9rem; border: 1.5px solid var(--border); background: var(--white);
  border-radius: var(--r-sm); font-size: .85rem; font-family: var(--font-body); cursor: pointer;
  transition: var(--ease);
}
.blog-pag__btn:hover, .blog-pag__btn.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ── SIDEBAR WIDGETS ── */
.blog-widget { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.blog-widget__title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.blog-widget--cta { background: var(--dark); border-color: transparent; }
.blog-widget--cta .blog-widget__title { color: var(--white); margin-top: .5rem; }
.blog-widget--cta .blog-widget__desc { color: rgba(255,255,255,.65); font-size: .85rem; line-height: 1.6; margin-bottom: 1.2rem; }
.blog-widget__tag { display: inline-block; background: var(--accent); color: #fff; font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .6rem; border-radius: var(--r-full); }

.blog-popular { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.blog-popular__item {}
.blog-popular__link { display: flex; gap: .75rem; align-items: flex-start; }
.blog-popular__thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--bg) center/cover no-repeat; }
.blog-popular__info { flex: 1; }
.blog-popular__cat { display: block; font-size: .65rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .2rem; }
.blog-popular__title { font-size: .82rem; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-popular__link:hover .blog-popular__title { color: var(--accent); }
.blog-popular__skeleton { height: 56px; background: var(--border); border-radius: var(--r-sm); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:.6} 50%{opacity:1} }

.blog-widget__socials { display: flex; flex-wrap: wrap; gap: .4rem; }
.blog-widget__social { font-size: .78rem; padding: .35rem .8rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-full); color: var(--text); transition: var(--ease); }
.blog-widget__social:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── FIL D'ARIANE ── */
.breadcrumb-wrap { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: .6rem 0; }
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ── ARTICLE INDIVIDUEL ── */
.article__cover { max-height: 480px; overflow: hidden; }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }
.article__container { max-width: 760px; margin: 0 auto; padding: 3rem clamp(1rem,3vw,2rem); }
.article__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: 1rem; }
.article__dot { opacity: .4; }
.article__cat { background: var(--accent-light); color: var(--accent); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .65rem; border-radius: var(--r-full); }
.article__title { font-family: var(--font-display); font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; }
.article__lead { font-size: 1.1rem; color: var(--muted); line-height: 1.75; border-left: 3px solid var(--accent); padding-left: 1.25rem; margin-bottom: 2rem; }

/* Contenu article */
.article__content { font-size: 1rem; line-height: 1.85; color: var(--text); }
.article__content h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 1rem; }
.article__content h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .75rem; }
.article__content p  { margin-bottom: 1.25rem; }
.article__content ul, .article__content ol { margin: 0 0 1.25rem 1.5rem; }
.article__content li { margin-bottom: .5rem; }
.article__content blockquote { border-left: 3px solid var(--accent); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--accent-light); border-radius: 0 var(--r-md) var(--r-md) 0; font-style: italic; }
.article__content img { border-radius: var(--r-md); margin: 1.5rem 0; }
.article__content a { color: var(--accent); text-decoration: underline; }
.article__content code { background: var(--bg); border: 1px solid var(--border); padding: .15rem .4rem; border-radius: var(--r-sm); font-size: .9em; }
.article__content pre { background: var(--dark); color: #e8e8e8; padding: 1.25rem; border-radius: var(--r-md); overflow-x: auto; margin-bottom: 1.25rem; }

.article__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.article__tag { font-size: .72rem; padding: .3rem .7rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-full); color: var(--muted); }

/* Boutons de partage */
.article__share { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; padding: 1.5rem; background: var(--bg); border-radius: var(--r-lg); }
.article__share-label { font-size: .82rem; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.article__share-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border: 1.5px solid var(--border); border-radius: var(--r-full); background: var(--white); font-size: .82rem; font-weight: 600; cursor: pointer; transition: var(--ease); font-family: var(--font-body); color: var(--text); }
.article__share-btn--fb:hover { background: #1877F2; border-color: #1877F2; color: #fff; }
.article__share-btn--wa:hover { background: #25D366; border-color: #25D366; color: #fff; }
.article__share-btn--li:hover { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.article__share-btn--x:hover  { background: #000; border-color: #000; color: #fff; }

/* ── COMMENTAIRES ── */
.blog-comm { padding: 3rem 0; background: var(--bg-alt); }
.blog-comm__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 2rem; }
.blog-comm__list { margin-bottom: 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.blog-comm__item { display: flex; gap: 1rem; }
.blog-comm__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.blog-comm__body { flex: 1; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem 1.25rem; }
.blog-comm__header { display: flex; gap: 1rem; align-items: center; margin-bottom: .5rem; flex-wrap: wrap; }
.blog-comm__header strong { font-size: .9rem; }
.blog-comm__header time { font-size: .75rem; color: var(--muted); }
.blog-comm__body p { font-size: .88rem; line-height: 1.65; margin: 0; }
.blog-comm__none, .blog-comm__closed { font-size: .9rem; color: var(--muted); padding: 1rem 0; }

.blog-comm__form-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 1.5rem; }
.blog-comm__form { max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .4rem; }
.form-group small { display: block; font-size: .75rem; color: var(--muted); margin-top: .3rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  font-size: .9rem; font-family: var(--font-body); background: var(--white);
  color: var(--text); transition: var(--ease); outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group--checkbox label { display: flex; align-items: flex-start; gap: .5rem; cursor: pointer; font-weight: 400; font-size: .85rem; }
.form-group--checkbox input[type="checkbox"] { width: auto; margin-top: .15rem; flex-shrink: 0; }
.required { color: var(--accent); }
.form-error { color: #e04000; font-size: .82rem; margin-bottom: .75rem; }
.form-note { font-size: .75rem; color: var(--muted); margin-top: .75rem; }
.form-note a { color: var(--accent); }
.form-submit { margin-top: .5rem; }
.blog-comm__success { background: #DCFCE7; border: 1px solid #86EFAC; border-radius: var(--r-md); padding: 1rem 1.25rem; color: #166534; font-size: .9rem; }

/* ── RESSOURCES GRILLE ── */
.ressources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}
.ressource-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--ease), box-shadow var(--ease);
}
.ressource-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.09); }
.ressource-card__cover {
  display: block; aspect-ratio: 16/9;
  background: var(--dark) center/cover no-repeat; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.ressource-card__icon { font-size: 2.5rem; opacity: .7; }
.ressource-card__badge { position: absolute; top: .75rem; right: .75rem; background: #16A34A; color: #fff; font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .28rem .65rem; border-radius: var(--r-full); }
.ressource-card__body { padding: 1.25rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.ressource-card__cat { font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .4rem; display: block; }
.ressource-card__title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin-bottom: .6rem; flex: 1; }
.ressource-card__title a:hover { color: var(--accent); }
.ressource-card__desc { font-size: .85rem; color: var(--muted); line-height: 1.65; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ressource-card__meta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.ressource-card__format, .ressource-card__dl { display: flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--muted); }
.ressource-card__btn { width: 100%; justify-content: center; }

/* ── COMMENT ÇA MARCHE (ressources) ── */
.ressources-steps__grid { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.ressources-step { text-align: center; max-width: 180px; }
.ressources-step__num { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem; margin: 0 auto .75rem; }
.ressources-step h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.ressources-step p { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.ressources-step__arrow { font-size: 1.5rem; color: var(--border); }
@media (max-width: 600px) { .ressources-step__arrow { display: none; } }

/* ── MODALE TÉLÉCHARGEMENT ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; opacity: 0; pointer-events: none;
  transition: opacity .25s ease; backdrop-filter: blur(4px);
}
.modal-overlay.is-open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--r-lg); max-width: 480px; width: 100%;
  padding: 2.5rem; position: relative;
  transform: translateY(20px) scale(.97);
  transition: transform .28s ease;
  box-shadow: 0 30px 80px rgba(0,0,0,.18);
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }
.modal__close {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  cursor: pointer; color: var(--muted); font-size: 1.4rem; line-height: 1;
  padding: .25rem .5rem; border-radius: var(--r-sm); transition: var(--ease);
}
.modal__close:hover { color: var(--dark); background: var(--bg); }
.modal__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.modal__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin-bottom: .3rem; }
.modal__resource-name { font-size: .88rem; color: var(--accent); font-weight: 600; margin-bottom: .75rem; }
.modal__desc { font-size: .88rem; color: var(--muted); line-height: 1.65; margin-bottom: 1.5rem; }
.modal__success { text-align: center; padding: 1rem 0; }
.modal__success-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal__success-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: .75rem; }
.modal__success-desc { font-size: .9rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.5rem; }

/* ── PAGE TÉLÉCHARGER (résultat token) ── */
.telecharger-wrap { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 4rem 1.5rem; }
.telecharger-box { max-width: 480px; width: 100%; text-align: center; }
.telecharger-box .modal__icon { font-size: 3rem; }

/* ── ACCESSIBILITÉ ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── ADMIN ── */
.admin-wrap { min-height: 100vh; background: #F8F9FA; font-family: var(--font-body); }
.admin-sidebar { width: 240px; background: var(--dark); color: rgba(255,255,255,.8); flex-shrink: 0; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-main { flex: 1; overflow: auto; }
.admin-topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.admin-content { padding: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE MOBILE — Blog + Ressources + Admin
   ═══════════════════════════════════════════════════════════════ */

/* ── TABLETTE (≤ 900px) ── */
@media (max-width: 900px) {

  /* Blog layout : sidebar passe en dessous */
  .blog-layout__inner { grid-template-columns: 1fr; gap: 2rem; }
  .blog-layout__sidebar { position: static; }

  /* Grilles : 2 colonnes max */
  .blog-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
  .ressources-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }

  /* Article : réduire le padding */
  .article__container { padding: 2.5rem 1.25rem; }
  .article__title { font-size: clamp(1.5rem, 5vw, 2.2rem); }

  /* Admin : sidebar fixe mais plus étroite */
  .admin-sidebar { width: 200px; }
  .admin-main { margin-left: 200px; }
  .admin-edit-layout { grid-template-columns: 1fr; }
  .admin-edit-sidebar { position: static; }
  .admin-grid-2 { grid-template-columns: 1fr; }
}

/* ── MOBILE (≤ 600px) ── */
@media (max-width: 600px) {

  /* ── Base anti-débordement ── */
  html, body { overflow-x: hidden; }
  .container { padding: 0 1rem; width: 100%; box-sizing: border-box; }
  .section { padding: 2.5rem 0; }

  /* ── Hero ── */
  .page-hero--dark { padding: 3.5rem 0 2.5rem; }
  .page-hero--dark .page-hero__title { font-size: 2rem; line-height: 1.2; }
  .page-hero--dark .page-hero__desc { font-size: .9rem; margin-bottom: 1.5rem; }
  .page-hero__title br { display: none; } /* Le titre tient sur une ligne fluide */

  /* ── Recherche ── */
  .blog-search-wrap { max-width: 100%; }
  .blog-search { font-size: .9rem; padding: .75rem 1rem .75rem 2.5rem; }

  /* ── Filtres : scroll horizontal contrôlé, sans débordement de la page ── */
  .filter-bar {
    display: flex; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: .5rem; gap: .4rem;
    max-width: 100%; width: 100%;
  }
  .filter-bar::-webkit-scrollbar { height: 2px; }
  .filter-bar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
  .filter-btn { white-space: nowrap; flex-shrink: 0; padding: .4rem .75rem; font-size: .78rem; }

  /* ── Blog layout ── */
  .blog-layout { overflow-x: hidden; }
  .blog-layout__inner { gap: 1.5rem; overflow-x: hidden; }

  /* ── Blog cards : 1 colonne, sans débordement ── */
  .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; width: 100%; overflow: hidden; }
  .blog-card { border-radius: var(--r-md); width: 100%; max-width: 100%; overflow: hidden; box-sizing: border-box; }
  .blog-card__body { padding: 1rem 1.1rem 1.25rem; overflow: hidden; }
  .blog-card__title { font-size: .98rem; word-break: break-word; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
  .blog-card__title a { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .blog-card__excerpt { font-size: .82rem; -webkit-line-clamp: 2; word-break: break-word; overflow-wrap: break-word; max-width: 100%; }
  .blog-card__thumb { aspect-ratio: 16/10; width: 100%; overflow: hidden; }
  .blog-card__meta { font-size: .75rem; flex-wrap: wrap; gap: .3rem; overflow: hidden; max-width: 100%; }
  .blog-card__cat-badge { font-size: .6rem; padding: .22rem .5rem; }

  /* ── Pagination ── */
  .blog-pagination { gap: .3rem; margin-top: 2rem; }
  .blog-pag__btn { padding: .4rem .7rem; font-size: .8rem; }

  /* ── Sidebar ── */
  .blog-widget { padding: 1.25rem; overflow: hidden; }
  .blog-widget__title { font-size: .92rem; }
  .blog-popular__thumb { width: 48px; height: 48px; flex-shrink: 0; }
  .blog-popular__title { font-size: .78rem; word-break: break-word; overflow-wrap: break-word; }
  .blog-popular__link { gap: .6rem; }
  .blog-popular__info { overflow: hidden; min-width: 0; }

  /* ── Article individuel ── */
  .article__cover { max-height: 260px; }
  .article__container { padding: 1.75rem 1rem; overflow-x: hidden; max-width: 100%; }
  .article__title { font-size: 1.45rem; line-height: 1.25; margin-bottom: 1rem; word-break: break-word; overflow-wrap: break-word; }
  .article__lead { font-size: .95rem; padding-left: 1rem; margin-bottom: 1.5rem; }
  .article__content { font-size: .92rem; line-height: 1.75; overflow-x: hidden; max-width: 100%; }
  .article__content h2 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; word-break: break-word; }
  .article__content h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; word-break: break-word; }
  .article__content p { word-break: break-word; overflow-wrap: break-word; }
  .article__content blockquote { padding: .75rem 1rem; margin: 1rem 0; font-size: .88rem; }
  .article__content ul, .article__content ol { margin-left: 1.25rem; }
  .article__content img { width: 100%; height: auto; max-width: 100%; }
  .article__content pre { font-size: .78rem; padding: .875rem; overflow-x: auto; max-width: 100%; }
  .article__content code { word-break: break-all; }
  .article__meta { font-size: .74rem; gap: .25rem; flex-wrap: wrap; overflow: hidden; max-width: 100%; }
  .article__tags { gap: .3rem; flex-wrap: wrap; }
  .article__tag { font-size: .68rem; padding: .25rem .55rem; }

  /* ── Boutons de partage ── */
  .article__share { flex-direction: column; align-items: stretch; padding: 1.25rem; gap: .5rem; }
  .article__share-label { margin-bottom: .25rem; }
  .article__share-btn { justify-content: center; padding: .6rem 1rem; font-size: .8rem; min-height: 44px; }

  /* ── Commentaires ── */
  .blog-comm { padding: 2rem 0; }
  .blog-comm__title { font-size: 1.25rem; margin-bottom: 1.5rem; }
  .blog-comm__item { gap: .6rem; }
  .blog-comm__avatar { width: 36px; height: 36px; font-size: .85rem; }
  .blog-comm__body { padding: .75rem 1rem; }
  .blog-comm__form { width: 100%; }
  .blog-comm__form-title { font-size: 1.05rem; }

  /* ── Formulaires ── */
  .form-row { grid-template-columns: 1fr; gap: .75rem; }
  .form-group input, .form-group textarea { font-size: 16px; /* évite zoom iOS */ padding: .7rem .9rem; }
  .form-submit { width: 100%; justify-content: center; min-height: 48px; font-size: .95rem; }

  /* ── Ressources ── */
  .ressources-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .ressource-card { border-radius: var(--r-md); }
  .ressource-card__body { padding: 1rem 1.25rem 1.25rem; }
  .ressource-card__title { font-size: 1rem; }
  .ressource-card__desc { font-size: .82rem; -webkit-line-clamp: 2; }
  .ressource-card__btn { min-height: 48px; font-size: .88rem; }
  .ressource-card__cover { aspect-ratio: 16/10; }
  .ressource-card__badge { font-size: .6rem; padding: .22rem .5rem; }

  /* ── Steps ressources ── */
  .ressources-steps__grid { flex-direction: column; gap: 1rem; }
  .ressources-step { max-width: 100%; }
  .ressources-step__arrow { display: none; }
  .ressources-step p { font-size: .8rem; }

  /* ── Modale ── */
  .modal-overlay { padding: 1rem; }
  .modal { padding: 1.75rem 1.25rem; max-height: 88vh; border-radius: var(--r-md); }
  .modal__title { font-size: 1.15rem; }
  .modal__desc { font-size: .85rem; }
  .modal__icon { font-size: 2rem; }
  .modal__close { top: .5rem; right: .5rem; font-size: 1.5rem; padding: .25rem .5rem; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

  /* ── Télécharger page ── */
  .telecharger-wrap { padding: 3rem 1rem; }

  /* ── ADMIN ── */
  .admin-wrap { overflow-x: hidden; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 240px; transform: translateX(-100%);
    transition: transform .3s ease; z-index: 1000;
    overflow-y: auto;
  }
  .admin-sidebar.is-open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.3); }
  .admin-main { margin-left: 0; width: 100%; }
  .admin-topbar { padding: .75rem 1rem; flex-wrap: wrap; gap: .5rem; }
  .admin-topbar__title { font-size: 1.1rem; }
  .admin-topbar__actions { width: 100%; display: flex; gap: .5rem; }
  .admin-topbar__actions .btn { flex: 1; text-align: center; }
  .admin-content { padding: 1rem; }

  /* Bouton hamburger admin */
  .admin-burger { display: flex; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: .5rem; min-width: 44px; min-height: 44px; justify-content: center; }
  .admin-burger span { display: block; width: 22px; height: 2px; background: #111; border-radius: 2px; transition: .3s; }
  .admin-burger.is-open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .admin-burger.is-open span:nth-child(2) { opacity: 0; }
  .admin-burger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

  /* Overlay derrière sidebar */
  .admin-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .admin-overlay.is-open { opacity: 1; pointer-events: all; }

  /* Stats admin : 2 colonnes */
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .admin-stat-card { padding: 1rem; gap: .75rem; }
  .admin-stat-icon { font-size: 1.5rem; }
  .admin-stat-val { font-size: 1.4rem; }
  .admin-stat-label { font-size: .72rem; }

  /* Tableaux admin : scroll horizontal */
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 500px; font-size: .8rem; }
  .admin-table th { padding: .6rem .75rem; font-size: .75rem; }
  .admin-table td { padding: .6rem .75rem; }
  .admin-actions { gap: .3rem; }
  .admin-btn { padding: .3rem .55rem; font-size: .72rem; }

  /* Recherche admin */
  .admin-search { flex-direction: column; gap: .5rem; }
  .admin-search input { width: 100%; }

  /* Formulaires admin */
  .admin-form .form-row { grid-template-columns: 1fr; }
  .admin-form input, .admin-form textarea, .admin-form select { font-size: 16px; }

  /* Tabs commentaires */
  .admin-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .admin-tab { white-space: nowrap; padding: .6rem .9rem; font-size: .82rem; }

  /* Éditeur article */
  #editor { min-height: 300px; }
  .ql-editor { min-height: 250px; font-size: .92rem; }

  /* Modale admin */
  .admin-modal { max-width: calc(100% - 2rem); padding: 1.5rem; }
}

/* ── TRÈS PETITS ÉCRANS (≤ 380px) ── */
@media (max-width: 380px) {
  .page-hero--dark .page-hero__title { font-size: 1.7rem; }
  .blog-card__title { font-size: .95rem; }
  .ressource-card__title { font-size: .95rem; }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-stat-card { flex-direction: row; }
}

/* ── Touch : agrandir les zones cliquables ── */
@media (hover: none) and (pointer: coarse) {
  .blog-card__btn, .ressource-card__btn,
  .blog-pag__btn, .admin-btn, .admin-tab {
    min-height: 44px;
  }
  .blog-card:hover, .ressource-card:hover {
    transform: none; /* Pas d'effet hover sur tactile */
  }
}

