/* Adaptations de la copie statique. Les styles de la référence sont dans assets/. */
:root { --replica-blue: var(--dgi-blue); }
html { scroll-behavior: smooth; }
:focus-visible { outline: 2px solid var(--dgi-yellow); outline-offset: 4px; }
::selection { background: var(--dgi-blue); color: #fff; }
.elementor-invisible { visibility: visible; }
.wpr-nav-menu-container { position: static; }
.wpr-mega-menu-container .wpr-mega-menu > li:hover > .wpr-sub-mega-menu,
.wpr-mega-menu-container .wpr-mega-menu > li:focus-within > .wpr-sub-mega-menu,
.wpr-mega-menu-container .wpr-mega-menu > li.menu-open > .wpr-sub-mega-menu {
 visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto;
}
.wpr-sub-mega-menu { left: 0; width: 100%; z-index: 100; }
.static-sticky { position: sticky; top: 0; z-index: 99; }
.wpr-ticker-marquee { display: flex; width: max-content; visibility: visible; opacity: 1; animation: ticker 50s linear infinite; }
.wpr-ticker-marquee:hover { animation-play-state: paused; }
.wpr-ticker-item { flex-shrink: 0; }
@keyframes ticker { to { transform: translateX(-50%); } }
.static-language { color: white; font-size: 14px; white-space: nowrap; }
.static-language a { color: inherit; }
.wpr-stt-btn { cursor: pointer; }
.wpr-mobile-toggle, .mobile-mega-menu-close { cursor: pointer; }
.wpr-mobile-nav-menu-container.mobile-is-open .wpr-mobile-mega-menu-wrap { transform: translateX(0) !important; visibility: visible !important; opacity: 1 !important; }
.wpr-mobile-mega-menu-wrap { overflow-y: auto; max-height: 100dvh; }
.static-notice { padding: 12px 18px; background: var(--dgi-pale); color: var(--dgi-blue); font: 14px/1.5 sans-serif; }
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 .wpr-ticker-marquee { animation: none; }
 .bdt-animation-kenburns { animation: none; }
}
.static-header { position: sticky; top: calc(-1 * var(--sticky-offset, 54px)); z-index: 100; }
.wpr-grid.static-grid { display: grid; grid-template-columns: repeat(var(--grid-columns, 1), minmax(0, 1fr)); gap: var(--grid-gap, 30px); height: auto !important; }
.wpr-grid.static-grid > article { width: 100%; position: relative !important; left: auto !important; top: auto !important; opacity: 1; visibility: visible; }
.wpr-grid.static-grid::before, .wpr-grid.static-grid::after { display: none; }
@media (max-width: 767px) { .wpr-grid.static-grid { grid-template-columns: minmax(0, 1fr); } }
.elementor .wpr-mega-menu-container .wpr-sub-mega-menu { margin-top: 0; }

.wpr-mobile-nav-menu-container.mobile-is-open .wpr-mobile-mega-menu { transform: translateX(calc(var(--menu-depth, 0) * -100%)); transition: transform .25s ease; }
.wpr-mobile-nav-menu-container.mobile-is-open .wpr-mobile-sub-menu { display: none; }
.wpr-mobile-nav-menu-container.mobile-is-open .menu-open > .wpr-mobile-sub-menu { display: block !important; left: 100% !important; top: 0 !important; opacity: 1 !important; visibility: visible !important; }
.wpr-mobile-mega-menu-wrap { overflow-x: hidden; }
/* Composants natifs WordPress : mêmes fontes, couleurs et rythmes. */
body.admin-bar .static-header { top: calc(32px - var(--sticky-offset, 54px)); }
.an-useful-links { list-style: none; padding: 0; margin: 0; }
.an-useful-links li { margin-bottom: 12px; }
.an-useful-links a { color: var(--dgi-blue); font: 600 14px/1.5 'Open Sans',sans-serif; }
.an-mega-columns { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 32px; gap: 32px; list-style: none; background: #fff; }
.an-mega-columns > li > a { font-weight: 600; }
.an-mega-links { list-style: none; padding: 12px 0 0; }
.an-mega-links li { padding: 4px 0; }
.an-mega-link { color: var(--dgi-ink); }
.an-mega-link:hover { color: var(--dgi-blue); }
.an-deputy-filters { width: 100%; }
.an-alphabet { display:flex; flex-wrap:wrap; gap:7px; border:0; padding:0; margin: 0 0 25px; }
.an-alphabet button { border:0; padding:4px 7px; background:none; color:var(--dgi-blue); font:600 16px 'Open Sans',sans-serif; }
.an-alphabet button.is-active,.an-alphabet button:hover { color:white; background:var(--dgi-blue); }
.an-filter-fields { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:30px; align-items:center; }
.an-filter-fields input,.an-filter-fields select { flex:1; min-width:180px; border:1px solid var(--dgi-border); border-radius:0; padding:12px; font-family:'Open Sans',sans-serif; }
.an-filter-fields button,.an-search button { background:var(--dgi-blue); color:white; border:0; padding:13px 20px; border-radius:0; }
.an-empty { padding:24px 0; color:var(--dgi-blue); }
.an-deputy-profile,.an-not-found { max-width:1200px; margin:auto; padding:40px 20px 80px; min-height:50vh; }
.an-deputy-profile h1,.an-not-found h1 { font-family:'Spectral',serif; color:var(--dgi-blue); margin:24px 0 40px; }
.an-deputy-profile-grid { display:grid; grid-template-columns:minmax(200px,320px) 1fr; gap:48px; }
.an-deputy-profile figure { margin:0; }
.an-deputy-profile img { width:100%;height:auto; }
.an-deputy-profile p { font-family:'Open Sans',sans-serif; line-height:1.75; }
.an-back-link { display:inline-block; margin-top:24px; }
.an-search { max-width:600px; }
.an-search > div { display:flex; margin-top:12px; gap:12px; }
.elementor-widget-post-info { font-family:'Open Sans',sans-serif; font-size:12px; line-height:1.7; }
.elementor-widget-post-info > a { color:inherit; }
.elementor-widget-post-info > a:not(:last-child)::after { content:', '; }
.elementor-widget-post-info > time { text-transform:uppercase; }
.pagination { margin:30px 0; }
.page-numbers { display:inline-block; padding:8px 12px; }
.page-numbers.current { background:var(--dgi-blue);color:white; }
@media(max-width:767px){.an-filter-fields{flex-direction:column;align-items:stretch}.an-filter-fields input,.an-filter-fields select{width:100%;flex:auto}.an-deputy-profile-grid{grid-template-columns:1fr;gap:24px}.an-deputy-profile figure{max-width:320px}body.admin-bar .static-header{top:calc(46px - var(--sticky-offset,15px));}}
.an-footer-nav { display:flex;flex-wrap:wrap;gap:24px;list-style:none;padding:0;margin:0;font:12px 'Open Sans',sans-serif; }
.an-footer-nav a { color:inherit; }
.wpr-grid.static-grid[data-an-layout="list"] .wpr-grid-item-inner { display:flex; gap:var(--media-gap,12px); align-items:flex-start; }
.wpr-grid.static-grid[data-an-layout="list"] .wpr-grid-media-wrap { flex:0 0 var(--media-width,30%); width:var(--media-width,30%); margin:0; }
.wpr-grid.static-grid[data-an-layout="list"] .wpr-grid-item-below-content { flex:1; min-width:0; }
.wpr-grid.static-grid[data-an-layout="list"] .wpr-grid-item-title { margin:0; }
.wpr-mobile-nav-menu-container .wpr-mobile-sub-menu { display:none !important; }
.wpr-mobile-nav-menu-container.mobile-is-open .menu-open > .wpr-mobile-sub-menu { display:block !important; }

.an-categories{list-style:none;padding:0}.an-categories li{padding:7px 0;border-bottom:1px solid var(--dgi-border)}.an-categories .children{padding-left:18px;list-style:none}.elementor-widget-table-of-contents[hidden],.elementor-toc__body[hidden]{display:none!important}.elementor-toc__body ol{padding-left:24px}.elementor-share-btn{color:#fff}
/* Les grilles natives ne dépendent pas du chargement animé de l'ancien plugin. */
.wpr-grid.static-grid{opacity:1!important}
.uagb-block-258ffe46 .uagb-icon-list__label{line-height:1.5!important}
/* Adaptations de contenu : identité, fontes, couleurs et gabarits conservés. */
.elementor-widget-theme-post-content table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse}
.elementor-widget-theme-post-content td,.elementor-widget-theme-post-content th{padding:10px;border:1px solid var(--dgi-border)}
.elementor-widget-theme-post-content h2,.elementor-widget-theme-post-content h3{margin-top:1.5em}
.elementor .wpr-sub-mega-menu{max-height:calc(100vh - 132px);overflow-y:auto}
/* Le logo DGI reste contenu dans la hauteur du bandeau d'origine. */
.elementor-location-header .wpr-logo img{width:170px;height:55px;object-fit:contain;object-position:left center}
.elementor-widget-theme-post-content :is(h2,h3,h4,h5,h6){line-height:1.3}
.elementor-widget-theme-post-content li>h3:first-child{margin-top:.8em}
/* Méga-menu : reprise du panneau de titre et des trois colonnes de la référence. */
.wpr-mega-menu>.menu-item>.wpr-sub-mega-menu{display:flex;padding:0;min-height:266px;background:#fff}
.an-mega-intro{flex:0 0 25%;padding:32px;background:var(--dgi-pale)}
.an-mega-intro h2{margin:0;color:var(--dgi-ink);font:600 26px/1.2 Inter,sans-serif}
.an-mega-columns{flex:1;min-width:0;grid-template-columns:repeat(3,minmax(0,1fr));padding:48px 16px;gap:32px;margin:0}
.an-mega-columns>li>a{color:var(--dgi-ink);font:700 16px/1.2 'Open Sans',sans-serif}
.an-mega-links{padding:6px 0 0}
.an-mega-links li{padding:3px 0}
.an-mega-links a{display:flex;align-items:baseline;gap:8px;color:var(--dgi-ink);font:400 16px/1.2 'Open Sans',sans-serif;white-space:normal}
.an-mega-links a::before{content:'\f30b';font-family:'Font Awesome 5 Free';font-weight:900;color:var(--dgi-blue);font-size:12px;flex:0 0 auto}
.an-mega-links a:hover{color:var(--dgi-blue)}
/* Même structure et mêmes retraits que le panneau du thème de référence. */
div[class*="wpr-sub-menu-fx"] .wpr-mega-menu>.menu-item>.wpr-sub-mega-menu{display:flex}
.elementor .wpr-mega-menu .an-mega-columns{padding:48px 16px;margin:0}
.elementor .wpr-mega-menu .an-mega-links{padding:6px 0 0;margin:0}
.wpr-mobile-nav-menu-container.mobile-is-open .menu-open>.wpr-mobile-sub-menu{position:absolute!important;width:100%}
.wpr-mobile-nav-menu-container .wpr-menu-offcanvas-back,.wpr-mobile-nav-menu-container .mobile-mega-menu-close{color:var(--dgi-blue);border-color:var(--dgi-border);background:#fff}
@media(max-width:767px){.home .elementor-heading-title{line-height:1.2!important}}
/* Fiches de l'équipe : mêmes portraits, titres et rythme que l'annuaire existant. */
/* A linear directory keeps each portrait, name and role together. */
.dgi-team-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin:20px 0 48px;border-top:1px solid var(--dgi-border)}
.dgi-team-card{display:grid;grid-template-columns:128px minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:24px;align-content:start;padding:24px 0;border-bottom:1px solid var(--dgi-border);min-width:0}
.dgi-team-card>img{grid-column:1;grid-row:1/4;display:block;width:128px;height:152px;object-fit:cover;object-position:center top;border-radius:4px;background:var(--dgi-pale)}
body:not(.home) #content .elementor-widget-theme-post-content .dgi-team-card h3{grid-column:2;grid-row:1;font-family:var(--dgi-body);font-size:var(--dgi-card-size,18px);font-weight:700;line-height:1.45;margin:0 0 8px;overflow-wrap:anywhere}
body #content .elementor-widget-theme-post-content .dgi-team-card p{grid-column:2;margin:0 0 8px;line-height:1.6;text-align:left}
.dgi-team-card>p:empty{display:none}
.dgi-team-card>p:has(a){align-self:start;margin-bottom:0}
body #content .elementor-widget-theme-post-content .dgi-team-card a{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:12px 24px;background:var(--dgi-blue);color:var(--dgi-white);border:0;border-bottom:2px solid var(--dgi-blue);border-radius:2px;font:600 16px/1.4 var(--dgi-body);text-decoration:none}
body #content .elementor-widget-theme-post-content .dgi-team-card a:hover{background:var(--dgi-blue-deep);border-color:var(--dgi-blue-deep);color:var(--dgi-white);text-decoration:none}
.dgi-team-card a:focus-visible{outline:2px solid var(--dgi-blue);outline-offset:4px}
.dgi-team-card:not(:has(img)){grid-template-columns:minmax(0,1fr);padding:20px 0}
body:not(.home) #content .elementor-widget-theme-post-content .dgi-team-card:not(:has(img)) :is(h3,p){grid-column:1}
@media(max-width:480px){.dgi-team-card{grid-template-columns:88px minmax(0,1fr);column-gap:16px;padding:20px 0}.dgi-team-card>img{width:88px;height:112px}.dgi-team-grid{margin-bottom:36px}}


/* Échelle éditoriale des pages intérieures : texte 16 px, titres décroissants. */
body:not(.home) #content .elementor-widget-theme-post-content{
 font-size:16px;line-height:1.7;
}
body:not(.home) #content .elementor-widget-theme-post-content :is(p,li,td,th,blockquote){
 font-size:inherit;line-height:1.7;
}
body:not(.home) #content .elementor-widget-theme-post-content p{margin:0 0 1em;max-width:75ch}
body:not(.home) #content .elementor-widget-theme-post-content :is(ul,ol){margin-block:0 1.25em}
body:not(.home) #content .elementor-widget-theme-post-content li+li{margin-top:.4em}
body:not(.home) #content h1{font-size:32px;line-height:1.25;font-weight:700;overflow-wrap:break-word}
body:not(.home) #content .elementor-widget-theme-post-content :is(h2,h3,h4,h5,h6){
 line-height:1.3;font-weight:600;margin:1.5em 0 .6em;overflow-wrap:break-word;
}
body:not(.home) #content .elementor-widget-theme-post-content h2{font-size:26px}
body:not(.home) #content .elementor-widget-theme-post-content h3{font-size:22px}
body:not(.home) #content .elementor-widget-theme-post-content h4{font-size:20px}
body:not(.home) #content .elementor-widget-theme-post-content h5{font-size:18px}
body:not(.home) #content .elementor-widget-theme-post-content h6{font-size:16px;font-weight:700}
body:not(.home) #content .elementor-widget-theme-post-content>:first-child{margin-top:0}
body:not(.home) #content .elementor-widget-heading :is(h2,h3){font-size:22px;line-height:1.3}
body:not(.home) #content .elementor-toc__header-title{font-size:20px;line-height:1.3}
body:not(.home) #content :is(.elementor-toc__body,.elementor-widget-wp-widget-nav_menu){font-size:16px;line-height:1.6}
@media(max-width:767px){
 body:not(.home) #content h1{font-size:28px}
 body:not(.home) #content .elementor-widget-theme-post-content h2{font-size:24px}
 body:not(.home) #content .elementor-widget-theme-post-content h3{font-size:20px}
}
body:not(.home) #content .an-useful-links a{font-size:16px;line-height:1.6}

/* Give the director-general portrait prominence within the leadership group. */
.dgi-team-grid:first-of-type>.dgi-team-card:first-child:has(img){grid-template-columns:224px minmax(0,1fr);align-content:center}
.dgi-team-grid:first-of-type>.dgi-team-card:first-child>img{width:224px;height:272px}
@media(max-width:600px){.dgi-team-grid:first-of-type>.dgi-team-card:first-child:has(img){grid-template-columns:minmax(0,1fr)}.dgi-team-grid:first-of-type>.dgi-team-card:first-child>img{grid-column:1;grid-row:auto;width:224px;max-width:100%;height:auto;margin-bottom:20px}body:not(.home) #content .elementor-widget-theme-post-content .dgi-team-grid:first-of-type>.dgi-team-card:first-child :is(h3,p){grid-column:1;grid-row:auto}}

.dgi-team-card a::before{content:"";display:block;flex:0 0 14px;width:14px;height:16px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z'/%3E%3C/svg%3E") center/contain no-repeat}

/* Full-width leadership directory: featured management, paired service rows. */
body.dgi-layout-full .dgi-team-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:48px;margin-bottom:56px}
body.dgi-layout-full .dgi-team-card{grid-template-columns:144px minmax(0,1fr);column-gap:24px;padding:28px 0}
body.dgi-layout-full .dgi-team-card>img{width:144px;height:176px}
body.dgi-layout-full .dgi-team-grid:first-of-type{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);column-gap:48px}
body.dgi-layout-full .dgi-team-grid:first-of-type>.dgi-team-card:first-child{grid-column:1;grid-row:1/3;grid-template-columns:248px minmax(0,1fr)}
body.dgi-layout-full .dgi-team-grid:first-of-type>.dgi-team-card:first-child>img{width:248px;height:304px}
body.dgi-layout-full .dgi-team-grid:first-of-type>.dgi-team-card:not(:first-child){grid-column:2;grid-template-columns:minmax(0,1fr);align-content:center}
@media(max-width:1100px){body.dgi-layout-full .dgi-team-grid:first-of-type{grid-template-columns:repeat(2,minmax(0,1fr))}body.dgi-layout-full .dgi-team-grid:first-of-type>.dgi-team-card:first-child{grid-column:1/-1;grid-row:auto}body.dgi-layout-full .dgi-team-grid:first-of-type>.dgi-team-card:not(:first-child){grid-column:auto}}
@media(max-width:767px){body.dgi-layout-full .dgi-team-grid,body.dgi-layout-full .dgi-team-grid:first-of-type{grid-template-columns:minmax(0,1fr);margin-bottom:36px}body.dgi-layout-full .dgi-team-card{grid-template-columns:112px minmax(0,1fr);gap:0 20px}body.dgi-layout-full .dgi-team-card>img{width:112px;height:144px}}
@media(max-width:600px){body.dgi-layout-full .dgi-team-grid:first-of-type>.dgi-team-card:first-child{grid-template-columns:minmax(0,1fr)}body.dgi-layout-full .dgi-team-grid:first-of-type>.dgi-team-card:first-child>img{width:248px;max-width:100%;height:auto}body #content .elementor-widget-theme-post-content .dgi-team-card a{padding:12px 16px}}
