/* EVALIR MAGAZINE · Divi 5 0.2 — styles réversibles */
:root{--evm-green:#24483f;--evm-olive:#718669;--evm-gold:#c8a46c;--evm-wine:#763f54;--evm-ink:#21332d;--evm-paper:#f9f7f1}
/* Pleine largeur de la structure, mais largeur de lecture préservée. */
body.ev-magazine-post #main-content > .container,
body.ev-magazine-post #main-content #content-area {width:95%!important;max-width:1580px!important;margin-inline:auto!important;box-sizing:border-box!important;}
body.ev-magazine-post #main-content #left-area {width:100%!important;max-width:100%!important;float:none!important;padding-right:0!important;}
body.ev-magazine-post #main-content #sidebar {display:none!important;}
body.ev-magazine-post #main-content .container:before {display:none!important;}
body.ev-magazine-post .et_pb_section {padding-left:0!important;padding-right:0!important;}
body.ev-magazine-post .et_pb_section .et_pb_row {width:100%!important;max-width:1550px!important;box-sizing:border-box!important;margin-inline:auto!important;}
body.ev-magazine-post .et_pb_section .et_pb_column{min-width:0;}
/* Use native Divi columns when they exist, not a second nested theme sidebar */
body.ev-magazine-post .et_pb_row .et_pb_column_3_4 {width:calc(100% - 332px)!important;}
body.ev-magazine-post .et_pb_row .et_pb_column_1_4 {width:300px!important;}
body.ev-magazine-post .et_pb_row .et_pb_column_3_4,
body.ev-magazine-post .et_pb_row .et_pb_column_1_4 {margin-right:0!important;}
body.ev-magazine-post .et_pb_row:has(> .et_pb_column_3_4):has(> .et_pb_column_1_4){display:flex!important;gap:32px!important;align-items:flex-start!important;}
/* Sofia and other self-designed living articles */
body.ev-magazine-post .sofia-article,body.ev-magazine-post .stm-article,body.ev-magazine-post .slow-magazine-article{width:100%!important;max-width:1550px!important;margin-inline:auto!important;}
body.ev-magazine-post .sofia-article .sofia-layout.evm-story-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 300px!important;gap:34px!important;align-items:start!important;}
body.ev-magazine-post .sofia-article .sofia-layout.evm-story-layout .sofia-story{min-width:0;max-width:920px;}
body.ev-magazine-post .sofia-article .sofia-layout.evm-story-layout .sofia-side{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:17px!important;position:sticky;top:24px;align-self:start;padding:0!important;margin:0!important;}
body.ev-magazine-post .sofia-article .stm-sidemeta{max-width:320px;}
body.ev-magazine-post .sofia-article .sofia-cover img,body.ev-magazine-post .stm-article .stm-hero img{width:100%;height:auto;object-fit:contain;display:block;}
body.ev-magazine-post .evm-latest{width:100%;min-width:0;}
/* Shared latest card layouts, including shortcode and magazine home */
.evm-kicker{font:700 11px/1.4 system-ui,sans-serif;letter-spacing:.13em;color:var(--evm-wine);text-transform:uppercase;}
.evm-latest{background:#fffaf2;border:1px solid #e4dac6;border-radius:14px;padding:20px;box-shadow:0 5px 20px #273f2b12;}
.evm-latest h3{font:700 25px/1.2 Georgia,serif;color:var(--evm-green);margin:7px 0 4px;}
.evm-latest>p{font:13px/1.5 system-ui,sans-serif;color:#69756d;margin:0 0 15px;}
.evm-card{display:flex;flex-direction:column;min-width:0;gap:0;text-decoration:none!important;border:1px solid #e9e1d4;background:#fff;border-radius:13px;overflow:hidden;color:var(--evm-ink)!important;transition:box-shadow .2s,transform .2s;}
.evm-card:hover{transform:translateY(-2px);box-shadow:0 10px 22px #162a241c;}
.evm-card-media{height:168px;background:#e4e8dd;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.evm-card-media img{width:100%;height:100%;display:block;object-fit:cover;}
.evm-noimage{font:40px Georgia,serif;color:var(--evm-olive)}
.evm-card-body{display:flex;flex-direction:column;gap:7px;padding:17px;font-family:system-ui,sans-serif;}
.evm-card-body strong{font:700 19px/1.25 Georgia,serif;color:var(--evm-green);}
.evm-card-body small{font:11px/1.3 system-ui,sans-serif;color:#758078;}
.evm-card-cat{font:700 10px/1.2 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--evm-wine);}
.evm-excerpt{font:13px/1.5 system-ui,sans-serif;color:#57645d;}
.evm-card-small{display:grid;grid-template-columns:82px minmax(0,1fr);gap:12px;background:transparent;border:0;border-bottom:1px solid #ddd9c9;border-radius:0;padding:12px 0;}
.evm-card-small:last-child{border:0;}
.evm-card-small .evm-card-media{height:76px;width:82px;border-radius:9px;}
.evm-card-small .evm-card-body{padding:0;gap:5px;}
.evm-card-small .evm-card-body strong{font:700 14.5px/1.35 Georgia,serif;overflow-wrap:anywhere;}
.evm-card-small .evm-card-cat{font-size:9px;}
/* Homepage presentation: independent of Divi inherited narrow page rows */
body.ev-magazine-homepage #main-content>.container,
body.ev-magazine-homepage #main-content #content-area {width:96%!important;max-width:1640px!important;margin-inline:auto!important;}
body.ev-magazine-homepage #main-content #left-area {width:100%!important;float:none!important;padding:0!important;}
body.ev-magazine-homepage #sidebar {display:none!important;}
body.ev-magazine-homepage #main-content .container:before {display:none!important;}
.evm-home{--evm-green:#24483f;--evm-wine:#763f54;--evm-ink:#21332d;--evm-gold:#c8a46c;max-width:1580px;margin:0 auto 38px;color:var(--evm-ink);padding:15px clamp(12px,2vw,32px) 45px;background:#fdfbf7;box-sizing:border-box;}
.evm-home *{box-sizing:border-box;}
.evm-home .evm-masthead{display:flex;justify-content:space-between;gap:12px;border-top:2px solid var(--evm-green);border-bottom:1px solid #c5cfbe;padding:9px 2px;font:700 11px/1.5 system-ui,sans-serif;letter-spacing:.09em;color:var(--evm-green);}
.evm-home .evm-title{text-align:center;padding:30px 0 23px;}
.evm-home .evm-title>p:first-child{font:700 14px/1.4 system-ui,sans-serif;letter-spacing:.22em;color:var(--evm-wine);margin:0 0 6px;}
.evm-home .evm-title h1{font:700 clamp(34px,4.3vw,68px)/1.11 Georgia,serif;color:var(--evm-green);margin:0 0 14px;padding:0;}
.evm-home .evm-lead{max-width:840px;margin:auto;font:italic clamp(16px,1.6vw,21px)/1.52 Georgia,serif;color:#46594b;}
.evm-home .evm-nav{border-top:1px solid #ccd5c5;border-bottom:1px solid #ccd5c5;padding:13px 6px;display:flex;gap:22px;flex-wrap:wrap;align-items:center;justify-content:center;}
.evm-home .evm-nav a{color:var(--evm-green);text-decoration:none;font:700 12px/1.4 system-ui,sans-serif;letter-spacing:.035em;}
.evm-home .evm-nav a:hover{color:var(--evm-wine);text-decoration:underline;}
/* 0.2.9 — UNE DU MAGAZINE : préserver l'intégralité de chaque image, même presque carrée.
   Ne pas imposer de hauteur fixe : les couvertures sources n'ont pas toutes le ratio 16:9. */
.evm-home .evm-home-hero{
 display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);
 gap:0;margin:27px 0 40px;min-height:0;
 align-items:stretch;overflow:hidden;border-radius:18px;
 box-shadow:0 12px 34px #1d312025;
}
.evm-home .evm-hero-image{
 display:flex;align-items:center;justify-content:center;
 min-width:0;overflow:hidden;background:#e7e4d9;line-height:0;
}
.evm-home .evm-hero-image img{
 display:block!important;width:100%!important;height:auto!important;
 max-height:none!important;min-height:0!important;
 object-fit:contain!important;object-position:center center!important;
 aspect-ratio:auto!important;
}
.evm-home .evm-hero-fallback{padding:90px 25px;font:700 30px Georgia,serif;color:#fff;line-height:1.2;}
.evm-home .evm-hero-text{
 background:var(--evm-green);color:#fff;
 padding:clamp(24px,2.75vw,42px);display:flex;flex-direction:column;
 align-items:flex-start;justify-content:center;gap:clamp(12px,1.4vw,20px);
 min-width:0;
}
.evm-home .evm-hero-text .evm-kicker{color:#f4d5a9;font-size:10px;letter-spacing:.12em;line-height:1.45;}
.evm-home .evm-hero-text h2{
 font:700 clamp(27px,2.2vw,41px)/1.17 Georgia,serif;
 margin:0;color:#fff;max-width:22ch;text-wrap:balance;
 overflow-wrap:break-word;hyphens:auto;
}
.evm-home .evm-hero-text p{
 font:clamp(14px,1vw,16px)/1.62 Georgia,serif;
 margin:0;color:#f2f7ef;max-width:58ch;
}
.evm-home .evm-read{
 font:700 13px/1.3 system-ui,sans-serif;color:#fff;background:#a76653;
 border-radius:50px;padding:12px 20px;text-decoration:none;align-self:flex-start;
}
.evm-home .evm-section-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:32px 0 22px;border-bottom:2px solid #e7e2d4;padding-bottom:13px;}
.evm-home .evm-section-heading h2{font:700 clamp(25px,2.8vw,40px) Georgia,serif;color:var(--evm-green);margin:5px 0 0;}
.evm-home .evm-section-heading a{font:600 13px system-ui,sans-serif;color:var(--evm-wine);white-space:nowrap;}
.evm-home .evm-recents{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:21px;}
.evm-home .evm-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:45px 0;}
.evm-home .evm-feature{padding:26px;border-radius:18px;border:1px solid #e4dacd;background:#f8f3eb;}
.evm-home .evm-literary{background:#f5f1e9;}
.evm-home .evm-professional{background:#eff4ed;}
.evm-home .evm-feature h2{font:700 clamp(25px,2.8vw,37px)/1.18 Georgia,serif;color:var(--evm-green);margin:9px 0 12px;}
.evm-home .evm-feature>p{font:16px/1.65 Georgia,serif;color:#42554a;margin:0 0 18px;}
.evm-home .evm-mini-cards{display:grid;grid-template-columns:1fr;}
.evm-home .evm-footer-cta{display:flex;align-items:center;justify-content:space-between;gap:35px;background:#24483f;color:#fff;border-radius:18px;padding:30px clamp(24px,4vw,50px);}
.evm-home .evm-footer-cta .evm-kicker{color:#e7bc89;}
.evm-home .evm-footer-cta h2{font:700 clamp(26px,3vw,43px)/1.15 Georgia,serif;color:#fff;margin:8px 0;}
.evm-home .evm-footer-cta p{font:15px/1.7 Georgia,serif;color:#ecf5e9;margin:0;max-width:580px;}
.evm-home .evm-footer-cta>div:last-child{display:flex;flex-direction:column;gap:12px;min-width:170px;}
.evm-home .evm-footer-cta a{padding:12px 20px;border-radius:40px;background:#f4e4be;color:#24483f;text-align:center;text-decoration:none;font:700 12px/1.35 system-ui,sans-serif;}
@media(max-width:1050px){
 body.ev-magazine-post .et_pb_row:has(> .et_pb_column_3_4):has(> .et_pb_column_1_4){display:block!important;}
 body.ev-magazine-post .et_pb_row .et_pb_column_3_4,body.ev-magazine-post .et_pb_row .et_pb_column_1_4{width:100%!important;margin:0 0 24px!important;}
 body.ev-magazine-post .sofia-article .sofia-layout.evm-story-layout{grid-template-columns:1fr!important;}
 body.ev-magazine-post .sofia-article .sofia-layout.evm-story-layout .sofia-side{position:static;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 body.ev-magazine-post .sofia-article .sofia-layout.evm-story-layout .sofia-pull{grid-column:1/-1;}
 .evm-home .evm-home-hero{grid-template-columns:1fr;}
 .evm-home .evm-hero-image img{height:auto!important;max-height:none!important;object-fit:contain!important;}
 .evm-home .evm-recents{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:680px){
 body.ev-magazine-post #main-content>.container,body.ev-magazine-post #main-content #content-area{width:100%!important;}
 body.ev-magazine-post .et_pb_section .et_pb_row{width:100%!important;}
 body.ev-magazine-post .sofia-article .sofia-layout.evm-story-layout .sofia-side{grid-template-columns:1fr!important;}
 .evm-home .evm-masthead{display:none;}
 .evm-home .evm-hero-text{padding:24px 20px;gap:13px;}
 .evm-home .evm-hero-text h2{font-size:clamp(25px,6vw,33px);line-height:1.18;}
 .evm-home .evm-hero-image img{width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;}
 .evm-home .evm-nav{gap:13px;}
 .evm-home .evm-recents,.evm-home .evm-split{grid-template-columns:1fr;}
 .evm-home .evm-footer-cta{display:block;}
 .evm-home .evm-footer-cta>div:last-child{margin-top:22px;}
 .evm-home .evm-section-heading{display:block;}
}

/* Pas de sommaire dans les pages éditoriales ; les menus du site sont préservés. */
body.ev-magazine-post .evm-final-toc, body.ev-magazine-post .stm-mini-nav, body.ev-magazine-post .ez-toc-container, body.ev-magazine-post .lwptoc, body.ev-magazine-post .toc_container {display:none!important;}

/* 0.2.3 — Sidebar unifiée, uniquement sur pages et articles éditoriaux.
   L’accueil et les pages WooCommerce n'utilisent pas cette colonne. */
body.evm-global-sidebar-enabled #main-content #sidebar,
body.evm-global-sidebar-enabled #sidebar,
body.evm-global-sidebar-enabled #main-content .widget-area:not(.evm-unified-sidebar){display:none!important;}
body.evm-sidebar-mounted #main-content > .evm-content-and-sidebar,
body.evm-sidebar-mounted #main-content .evm-content-and-sidebar{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,310px)!important;gap:clamp(18px,2.5vw,36px)!important;align-items:start!important;width:96%!important;max-width:1580px!important;margin:26px auto 50px!important;box-sizing:border-box!important;}
body.evm-sidebar-mounted .evm-reading-column{min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
body.evm-sidebar-mounted .evm-reading-column>.container,
body.evm-sidebar-mounted .evm-reading-column>.entry-content,
body.evm-sidebar-mounted .evm-reading-column>.et_builder_inner_content{max-width:100%!important;width:100%!important;margin:0!important;float:none!important;}
body.evm-sidebar-mounted .evm-reading-column #content-area,
body.evm-sidebar-mounted .evm-reading-column #left-area{max-width:100%!important;width:100%!important;padding:0!important;float:none!important;}
body.evm-sidebar-mounted .evm-reading-column .container:before{display:none!important;}
body.evm-sidebar-mounted .evm-reading-column .et_pb_section,
body.evm-sidebar-mounted .evm-reading-column .et_pb_row{max-width:100%!important;width:100%!important;margin-left:auto!important;margin-right:auto!important;}
body.evm-sidebar-mounted .evm-reading-column .sofia-article,
body.evm-sidebar-mounted .evm-reading-column .stm-article{width:100%!important;max-width:100%!important;}
/* Une ancienne colonne Divi dédiée uniquement aux derniers articles ne s'affiche plus. */
body.evm-sidebar-mounted .evm-reading-column .evm-legacy-column{display:none!important;}
body.evm-sidebar-mounted .evm-reading-column .et_pb_row:has(> .evm-legacy-column){display:block!important;}
body.evm-sidebar-mounted .evm-reading-column .et_pb_row:has(> .evm-legacy-column)>:not(.evm-legacy-column){max-width:100%!important;width:100%!important;float:none!important;}
body.evm-sidebar-mounted .sofia-article .sofia-layout.evm-story-layout{display:grid!important;grid-template-columns:1fr!important;gap:24px!important;}
body.evm-sidebar-mounted .sofia-article .sofia-layout.evm-story-layout .sofia-story{max-width:940px!important;width:100%!important;}
body.evm-sidebar-mounted .sofia-article .sofia-layout.evm-story-layout .sofia-side{position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;max-width:100%!important;}
body.evm-sidebar-mounted .stm-article .stm-layout{grid-template-columns:minmax(0,1fr)!important;}
body.evm-sidebar-mounted .stm-article .stm-sidemeta{position:static!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:100%!important;}
/* Toujours garder le menu général et le pied de page WordPress. */
.evm-unified-sidebar,.evm-unified-sidebar *{box-sizing:border-box!important;}
.evm-unified-sidebar[hidden]{display:none!important;}
.evm-unified-sidebar{min-width:0!important;width:100%;display:grid;gap:22px;align-content:start;position:sticky;top:26px;}
.evm-aside-section{min-width:0;padding:0 0 8px;background:#fffaf2;border:1px solid #e6dcca;border-radius:15px;overflow:hidden;box-shadow:0 8px 22px rgba(30,50,35,.08);}
.evm-aside-section .evm-aside-eyebrow{display:block;padding:16px 17px 6px;background:#254d42;color:#e9d8b8;font:700 10px/1.4 system-ui,sans-serif;letter-spacing:.12em;}
.evm-aside-section h2{font:700 24px/1.2 Georgia,serif;color:white;background:#254d42;padding:0 17px 7px;margin:0;}
.evm-aside-section .evm-aside-intro{padding:0 17px 13px;margin:0;background:#254d42;color:#eaf0ea;font:13px/1.5 system-ui,sans-serif;}
.evm-aside-list{list-style:none!important;padding:5px 14px 9px!important;margin:0!important;}
.evm-aside-item{list-style:none!important;margin:0!important;padding:0!important;border-bottom:1px solid #e7dfd0;}
.evm-aside-item:last-child{border-bottom:0;}
.evm-aside-link{display:grid!important;grid-template-columns:84px minmax(0,1fr)!important;gap:11px!important;align-items:center!important;text-decoration:none!important;padding:12px 0!important;color:#24483f!important;}
.evm-aside-link:hover strong,.evm-aside-link:focus-visible strong{color:#753a52!important;text-decoration:underline;}
.evm-aside-thumb{display:block;overflow:hidden;aspect-ratio:1.13;width:84px;border-radius:8px;background:#dfe7dc;}
.evm-aside-thumb img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;max-height:none!important;}
.evm-aside-placeholder{display:flex;width:100%;height:100%;align-items:center;justify-content:center;font:35px Georgia,serif;color:#7c927c;background:linear-gradient(130deg,#e9ecda,#e8d9bf);}
.evm-aside-copy{display:flex;min-width:0;flex-direction:column;gap:5px;}
.evm-aside-copy strong{color:#24483f;font:700 14px/1.34 Georgia,serif;overflow-wrap:anywhere;}
.evm-aside-copy small{color:#737c72;font:11px/1.3 system-ui,sans-serif;}
.evm-aside-link:focus-visible{outline:3px solid #c6a26b;outline-offset:1px;}
@media(max-width:1080px){
 body.evm-sidebar-mounted #main-content .evm-content-and-sidebar{grid-template-columns:minmax(0,1fr) 265px!important;gap:18px!important;}
 .evm-aside-link{grid-template-columns:70px minmax(0,1fr)!important;}
 .evm-aside-thumb{width:70px;}
}
@media(max-width:930px){
 body.evm-sidebar-mounted #main-content .evm-content-and-sidebar{display:flex!important;flex-direction:column!important;width:96%!important;}
 .evm-unified-sidebar{position:static;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
}
@media(max-width:560px){
 body.evm-sidebar-mounted #main-content .evm-content-and-sidebar{width:100%!important;margin:0 auto 30px!important;}
 .evm-unified-sidebar{grid-template-columns:1fr;gap:18px;padding:0 12px;}
 body.evm-sidebar-mounted .sofia-article .sofia-layout.evm-story-layout .sofia-side{grid-template-columns:1fr!important;}
}

/* Version 0.2.4 — retirer le sommaire, éviter le titre Divi en double,
   et laisser la colonne de droite défiler normalement avec la page. */
body.evm-global-sidebar-enabled.single-post #main-content .et_pb_post_title h1,
body.evm-global-sidebar-enabled.single-post #main-content .et_pb_title_container h1,
body.evm-global-sidebar-enabled.single-post #main-content .et_post_meta_wrapper > h1,
body.evm-global-sidebar-enabled.single-post #main-content h1.entry-title {display:none!important;}
/* Une colonne plus haute que l'écran ne doit jamais rester collée en haut. */
body.evm-sidebar-mounted .evm-unified-sidebar,
body.evm-global-sidebar-enabled #evm-unified-sidebar{
 position:static!important;top:auto!important;bottom:auto!important;
 max-height:none!important;height:auto!important;overflow:visible!important;
 transform:none!important;align-self:start!important;
}
body.evm-sidebar-mounted .evm-content-and-sidebar{
 overflow:visible!important;align-items:start!important;
}
/* Sommaires produits par d'anciens modules. */
body.evm-global-sidebar-enabled .evm-final-toc,
body.evm-global-sidebar-enabled .ez-toc-container,
body.evm-global-sidebar-enabled .lwptoc,
body.evm-global-sidebar-enabled .toc_container {display:none!important;}

/* 0.2.5 — doublons de présentation Divi, uniquement si la couverture existe dans le récit. */
body.single-post.evm-has-inbody-cover [data-evm-hidden-duplicate="true"]{display:none!important;}
body.single-post.evm-has-inbody-cover #main-content .evm-contains-real-editorial{min-height:0;}
/* Le titre WP/Divi reste dans les métadonnées, mais ne fait pas doublon avec l'image-titre. */
body.single-post.evm-has-inbody-cover #main-content .et_pb_post_title,
body.single-post.evm-has-inbody-cover #main-content .et_post_meta_wrapper{display:none!important;}

/* 0.2.7 — les sommaires historiques doivent disparaître partout, sans masquer
   les cartes, le menu du site, la couverture ni l'immersion. */
body.evm-global-sidebar-enabled [data-evm-toc-hidden="1"] {display:none!important;}

/* 0.3.0 : neutralise aussi les blocs injectés en cas de cache navigateur ancien. */
body.evm-global-sidebar-enabled [data-evm-template-parasite="1"]{display:none!important;}
