/*
Theme Name: Save Market Blog
Theme URI: https://save-market.com/blog/
Description: Theme enfant de Twenty Twenty-Three pour le blog Save Market : hero fonce, cartes responsives a badges colores, article a la une et temps de lecture.
Author: Save Market
Template: twentytwentythree
Version: 1.3.0
Text Domain: save-market-blog
*/

/* ===== Hero ===== */
.sm-hero{background:#0F1B17;border-radius:16px;padding:3rem 2rem;margin:2rem auto;}
.sm-hero__eyebrow{color:#5DCAA5;font-size:.8rem;letter-spacing:.05em;text-transform:uppercase;margin:0 0 .6rem;}
.sm-hero__title{color:#F1F5F3;font-size:2rem;line-height:1.2;margin:0 0 .6rem;max-width:24ch;}
.sm-hero__subtitle{color:#9FB5AC;font-size:1.05rem;line-height:1.6;margin:0;max-width:54ch;}
@media(max-width:600px){.sm-hero{padding:2rem 1.3rem;}.sm-hero__title{font-size:1.55rem;}}

/* ===== Grille de cartes (responsive) ===== */
.sm-cards.wp-block-post-template{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.5rem;list-style:none;margin:1.6rem 0 0;padding:0;}
.sm-cards > li{background:#fff;border:1px solid #E7E7E2;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;list-style:none;margin:0;}
.sm-card__media{margin:0;line-height:0;}
.sm-card__media img{width:100%;aspect-ratio:16/10;object-fit:cover;display:block;}
.sm-card__body{display:flex;flex-direction:column;flex:1;gap:.55rem;padding:1.1rem 1.2rem 1.2rem;}

/* Badges : pills separes, colores par categorie, sans virgule */
.sm-badges{display:flex;flex-wrap:wrap;gap:6px;margin:0;}
.sm-badges a{display:inline-block;font-size:.72rem;font-weight:600;letter-spacing:.02em;padding:4px 11px;border-radius:999px;text-decoration:none;background:#EEF0EA;color:#3B4A2E;}
.sm-badges a[href*="/category/bonnes-pratiques"]{background:#E1F5EE;color:#085041;}
.sm-badges a[href*="/category/analyses-de-tendances"]{background:#E6F1FB;color:#0C447C;}
.sm-badges a[href*="/category/legislation"]{background:#FAEEDA;color:#633806;}
.sm-badges a[href*="/category/astuces"]{background:#EEEDFE;color:#26215C;}
.sm-badges a[href*="/category/ecolo"]{background:#EAF3DE;color:#27500A;}
.sm-badges a[href*="/category/save-market"]{background:#F1EFE8;color:#444441;}

.sm-card__title{font-size:1.12rem;line-height:1.3;margin:.15rem 0;}
.sm-card__title a{text-decoration:none;color:#16201C;}
.sm-card__title a:hover{color:#1D9E75;}
.sm-card__excerpt{color:#5b5b57;font-size:.92rem;line-height:1.55;margin:0;flex:1;}

/* Pied de carte (temps de lecture + date) */
.sm-card__meta{display:flex;align-items:center;gap:.55rem;color:#9a9a93;font-size:.78rem;margin-top:.35rem;}
.sm-card__meta a{color:inherit;text-decoration:none;}
.sm-rt{display:inline-flex;align-items:center;}
.sm-rt::before{content:"";width:13px;height:13px;margin-right:5px;background:currentColor;--clock:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");-webkit-mask:var(--clock) center/contain no-repeat;mask:var(--clock) center/contain no-repeat;}
.sm-card__date::before{content:"•";margin-right:.55rem;color:#cfcfc8;}

/* ===== Article a la une (1re carte) ===== */
@media(min-width:900px){
  .sm-cards > li:first-child{grid-column:1 / -1;display:grid;grid-template-columns:1.05fr 1fr;align-items:stretch;}
  .sm-cards > li:first-child .sm-card__media{height:100%;}
  .sm-cards > li:first-child .sm-card__media img{height:100%;aspect-ratio:auto;min-height:320px;}
  .sm-cards > li:first-child .sm-card__body{justify-content:center;padding:2rem;}
  .sm-cards > li:first-child .sm-card__title{font-size:1.6rem;}
  .sm-cards > li:first-child .sm-card__excerpt{font-size:1rem;}
}

/* ===== Page article : image du haut plafonnee ===== */
.single .wp-block-post-featured-image{margin:0 auto 1.6rem;}
.single .wp-block-post-featured-image img{width:100%;max-height:380px;object-fit:cover;border-radius:12px;}

/* ===== Footer Save Market (sans credit WordPress) ===== */
.sm-footer{border-top:1px solid #E7E7E2;margin-top:3rem;}
.sm-footer__copy{color:#9a9a93;font-size:.85rem;margin:0;}
.sm-footer .wp-block-site-title a{text-decoration:none;color:#16201C;font-weight:600;}

/* ===== Page article (single) ===== */
.sm-post-hero{color:#fff;align-items:flex-end;padding:3rem 1.2rem 2.4rem;}
.sm-post-hero .sm-post-hero__inner{width:100%;}
.sm-post-hero .sm-badge a{display:inline-block;background:rgba(225,245,238,.15);color:#5DCAA5;font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:5px 12px;border-radius:6px;text-decoration:none;}
.sm-post-hero__title{color:#fff;font-size:2.5rem;line-height:1.14;margin:.8rem 0 .9rem;max-width:18ch;}
.sm-post-meta{color:#9FB5AC;font-size:.9rem;gap:.5rem;align-items:center;}
.sm-post-meta a{color:#9FB5AC;text-decoration:none;}
.sm-post-meta .sm-rt::before{content:"·";margin-right:.5rem;color:#5d756b;}
.sm-post-author::before{content:"·";margin-right:.5rem;color:#5d756b;}
@media(max-width:600px){.sm-post-hero__title{font-size:1.8rem;}}

.sm-article{padding:2.6rem 1.2rem 1rem;}
.sm-article p{font-size:1.06rem;line-height:1.78;color:#2c2c29;}
.sm-article h2{font-size:1.65rem;line-height:1.25;margin:2.4rem 0 .7rem;color:#13201b;}
.sm-article h3{font-size:1.25rem;margin:1.7rem 0 .5rem;color:#13201b;}
.sm-article ul,.sm-article ol{line-height:1.75;color:#2c2c29;padding-left:1.2rem;}
.sm-article li{margin:.35rem 0;}
.sm-article a{color:#0c6b4f;}

/* Tableaux de valorisation */
.sm-article table,.sm-article .wp-block-table table{width:100%;border-collapse:collapse;margin:1.6rem 0;font-size:.96rem;}
.sm-article th{background:#0F1B17;color:#E1F5EE;text-align:left;padding:.75rem .95rem;font-weight:600;}
.sm-article td{border-bottom:1px solid #E7E7E2;padding:.7rem .95rem;color:#2c2c29;}
.sm-article tr:nth-child(even) td{background:#F7FAF8;}

/* Encadre Points cles */
.sm-keypoints{background:#EAF5F0;border-left:4px solid #1D9E75;border-radius:10px;padding:1.4rem 1.6rem;margin:1.8rem 0;}
.sm-keypoints>p:first-child,.sm-keypoints>h3,.sm-keypoints>h4{font-weight:700;margin:0 0 .7rem;font-size:1.05rem;color:#13201b;}
.sm-keypoints ul{margin:0;}
.sm-keypoints li{color:#264a3d;}

/* Encadre CTA */
.sm-cta{background:#0F1B17;border-radius:14px;padding:2rem 1.8rem;color:#fff;text-align:center;margin:2.4rem 0;}
.sm-cta h2,.sm-cta h3,.sm-cta p{color:#fff;margin:.2rem 0;}
.sm-cta h3{font-size:1.4rem;}
.sm-cta .wp-block-button__link{background:#1D9E75;color:#04342C;font-weight:600;border-radius:999px;padding:12px 24px;}
