/*
 This CSS file is used to override the existing styles of the theme.
 You can change the article headings, fonts, colors, etc.
*/

/* base Règles globales */
/* Les ancres ne passent pas sous le header */
html {
    scroll-padding-top: calc(var(--header-h, 6rem) + 1rem);
}
dd strong {
    text-decoration: underline;
}
dd li::marker {
    content: "- ";
}
.mx-auto {
    top: 80px;
    left: 10%;
    width: 80%;
}
.aspect-video {
    align-content: center;
    justify-items: center;
}
.aspect-video img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}


/* site-header Header fixe et barre de navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #FFFFFF;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
}
#exygen-site {
    background: #FFFFFF;
    color: #0a4eb3;
    font-size: larger;
    font-weight: bold;
}
nav {
    padding-top: 0;
    padding-bottom: 0;
    background: #FFFFFF;
}
nav a {
    color: #0a4eb3;
    padding-left: 10px;
    padding-right: 10px;
}
nav a:hover {
    font-weight: bold;
}
/* Menu déroulant */
nav li { position: relative; }
nav li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
}
nav li:hover > ul,
nav li:focus-within > ul {
    display: block;
}


/* header-btn Boutons d'accès direct (header) */
.header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .75rem;
}
.header-btn {
    display: inline-block;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}
.header-btn:hover {
    background: #0077b8;
    border: 2px solid #0077b8;
    color: #FFFFFF;
}
nav a.header-btn.primary {
    background: linear-gradient(135deg, var(--exygen-light-8), var(--exygen-dark-8));
    border: 2px solid var(--exygen-dark-8);
    color: #FFFFFF;
}
nav a.header-btn.primary:hover {
    background: linear-gradient(135deg, var(--exygen-dark-8), var(--exygen-light-8));
    border: 2px solid var(--exygen-dark-8);
    color: #FFFFFF;
}
nav a.header-btn.secondary {
    background: linear-gradient(135deg, var(--exygen-light-2), var(--exygen-dark-2));
    border: 2px solid var(--exygen-dark-2);
    color: #FFFFFF;
}
nav a.header-btn.secondary:hover {
    background: linear-gradient(135deg, var(--exygen-dark-2), var(--exygen-light-2));
    border: 2px solid var(--exygen-dark-2);
    color: #FFFFFF;
}
/* Dans l'overlay mobile (fond sombre) */
#overlay .header-btn {
    font-size: 1.25rem;
    border-color: #FFFFFF;
    color: #FFFFFF;
}
#overlay .header-btn--primary {
    background: #FFFFFF;
    color: #0077b8;
}


/* e2-home-hero Bandeau de la page d'accueil (partials/home-hero.html) */
e2-home-hero {
    display: block;
    background: var(--exygen-medium-2);
    color: #fff;
    padding-top: 0;
    padding-bottom: 1rem;
}
e2-home-hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
}
e2-home-hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0;
}
e2-home-hero .hero-inner {
    max-width: 80rem;
    margin: 0 auto;
    text-align: center;
}


/* e2-feature Cartes retournables (flip) : accueil, simulateurs */
.feature {
    perspective: 1400px;
    height: 290px;
    position: relative;
    cursor: pointer;
    padding: 10px;
}
.feature-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .75s cubic-bezier(.4, .05, .2, 1);
}
.feature:hover .feature-inner,
.feature:focus-within .feature-inner {
    transform: rotate3d(1, 1, 0, 180deg);
}
.feature-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 20px rgba(30, 58, 15, .10);
    display: flex;
    flex-direction: column;
}
.feature-face.back {
    transform: rotate3d(1, 1, 0, 180deg);
    padding: 18px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
}
.feature-face.back a:hover {
    text-decoration: underline;
}
.feature-image {
    flex: 1;
    display: grid;
    place-items: center;
    font-size: 3.4rem;
    color: #fff;
}
/* Zone image : prend la hauteur restante au-dessus du h3, sans jamais le pousser */
e2-feature div.feature-image {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}
/* L'image est sortie du flux : elle couvre la zone sans influencer la mise en page */
e2-feature div.feature-image > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;         /* couvre toute la zone, rogne l'excédent */
    object-position: center;   /* centre horizontalement + verticalement */
}
/* Le titre reste en bas, à sa taille */
e2-feature .feature-face.front > h3 {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
e2-feature .feature-face.front h3 {
    color: #FFFFFF;
    font-size: 1.5rem;
    text-align: center;
}
e2-feature .feature-face.back {
    background: #FFFFFF;
}
e2-feature:nth-of-type(1) .feature-face.front {
    background: linear-gradient(135deg, var(--exygen-light-5), var(--exygen-dark-5));
}
e2-feature:nth-of-type(2) .feature-face.front {
    background: linear-gradient(135deg, var(--exygen-light-2), var(--exygen-dark-2));
}
e2-feature:nth-of-type(3) .feature-face.front {
    background: linear-gradient(135deg, var(--exygen-light-8), var(--exygen-dark-8));
}
e2-feature:nth-of-type(4) .feature-face.front {
    background: linear-gradient(135deg, var(--exygen-light-3), var(--exygen-dark-3));
}

e2-feature .theme{
    font-weight: 600;
}
e2-feature a{
    text-decoration: #0a4eb3 underline;
    color: #0a4eb3;
}
    /* simu-map Carte de France (page simulateurs) */
.simu-map {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(30, 58, 15, .10);
}
.map-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .92rem;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid #e0d8c8;
    background: linear-gradient(180deg, #fbf9f4, #f5f1e8);
}
.map-breadcrumb button {
    background: none;
    border: none;
    color: #2d5016;
    font: inherit;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.map-breadcrumb button:hover {
    background: rgba(45, 80, 22, .08);
    text-decoration: underline;
}
.map-breadcrumb .sep {
    color: #b0a894;
}
.map-breadcrumb .current {
    font-weight: 700;
    color: #1e3a0f;
    padding: 4px 8px;
}
.map-stage {
    position: relative;
    height: min(560px, 70vh);
    padding: 18px;
}
.map-stage svg {
    width: 100%;
    height: 100%;
    display: block;
}
.map-stage svg path {
    transition: fill .25s;
    cursor: pointer;
    stroke: #fff;
    stroke-width: .7;
}
.map-stage svg path:hover {
    fill: #e8c46a !important;
}
.map-stage svg path.selected {
    fill: #b8860b !important;
}
.map-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 58, 15, .88);
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: .85rem;
    pointer-events: none;
    transition: opacity .3s;
}
.map-hint.hidden {
    opacity: 0;
}
.map-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #888;
    font-size: .95rem;
}
/* Liste des simulateurs superposée à la carte */
.choice-panel {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    gap: 24px;
    padding: 18px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.choice-panel.open {
    opacity: 1;
    pointer-events: auto;
}
.choice-title {
    margin: 0;
    color: #1e3a0f;
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
}
.choice-options {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}
.choice-options .feature {
    flex: 0 1 260px;
}
.choice-back {
    background: none;
    border: none;
    color: #2d5016;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}


/* section-nav Navigateur fixe de sections (départements, blog) */
.section-nav {
    position: sticky;
    top: var(--header-h, 6.5rem);
    z-index: 30;
    background: #FFFFFF;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    padding: .5rem 0;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e5e7eb;
    /* déborde un peu sur les côtés pour masquer le bord des cartes qui défilent dessous */
    box-shadow: -8px 0 #FFFFFF, 8px 0 #FFFFFF;
}
.section-nav a {
    padding: .35rem .8rem;
    border: 1px solid #2d5016;
    border-radius: 999px;
    color: #2d5016;
    font-weight: 500;
    text-decoration: none;
}
.section-nav a:hover {
    background: #2d5016;
    color: #fff;
}
.section-group {
    margin-bottom: 2.5rem;
    /* L'ancre de la tranche ne passe pas sous le header + le navigateur */
    scroll-margin-top: calc(var(--subnav-h, 3.5rem) + .5rem); /* s'ajoute au scroll-padding-top de html (hauteur du header) */
}
.section-group h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}


/* dep-list Liste des départements */
.dep-list {
    list-style: none;
    padding: 0;
}
.dep-list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .4rem 0;
    text-decoration: none;
}
.dep-list a:hover span:last-child {
    text-decoration: underline;
}
.dep-icon {
    flex: 0 0 160px;
    height: 30px;
}
.dep-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}


/* e2-blog Liste des articles de blog */
e2-blog {
    border-color: #FFFFFFFF !important;
    padding: 5px;
}
e2-blog img {
    max-height: 150px;
    max-width: 150px;
}
/* La zone (conteneur ou classes Tailwind) fixe la taille ; l'image s'y ajuste */
e2-blog-item img {
    object-fit: scale-down;    /* réduit l'image pour qu'elle tienne entière, sans l'agrandir */
    object-position: center;   /* centre horizontalement + verticalement */
    display: block;
    width: var(--e2-blog-img-width);
}


/* e2-glossaire Glossaire (terminologie) */
e2-glossaire .glossary-nav {
    position: sticky;
    top: var(--header-h, 6.5rem);
    z-index: 30;
    background: #FFFFFF;
    text-align: center;
    padding: .5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}
e2-glossaire .glossary-nav span {
    font-size: 24px;
    font-weight: bold;
    color: #d1d5db;
    margin-left: 10px;
}
e2-glossaire .glossary-nav a {
    font-size: 24px;
    font-weight: bold;
    color: var(--exygen-dark-2);
    margin-left: 10px;
}
/* Les ancres des lettres et des termes ne passent pas sous le header + l'index */
e2-glossaire .glossary-letter,
e2-glossaire .glossary-item {
    scroll-margin-top: calc(var(--subnav-h, 3.5rem) + .5rem); /* s'ajoute au scroll-padding-top de html (hauteur du header) */
}
e2-glossary-item dt {
    font-weight: bold;
    margin-top: 5px;
    margin-left: 20px;
}
e2-glossary-item dd {
    margin-left: 10px;
}


/* doc-list Liste des documents */
.doc-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}
.doc-list a {
    display: block;
    padding: 1rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #2d5016;
    text-decoration: none;
}
.doc-list a:hover {
    background: #f5f1e8;
}
.doc-list-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d5016;
}
.doc-list-desc {
    display: block;
    margin-top: .25rem;
    color: #4b5563;
}


/* e2-applications-grid Grille des cartes d'application (/applications/) : autant de cartes
   par ligne que la largeur le permet (14rem min), les suivantes passent à la ligne */
.e2-applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1.5rem;
}

page-step{
    display: none;
}

section ul li span strong{
    font-weight: 800;
}

.link{
    color: #0a4eb3;
    text-decoration: underline;
    font-weight: bolder;
}

h1.mb-6{
    margin:0;
}
article{
    padding:20px;
}
header.mb-8{
    margin:0;
}
/* Cookie Guard (bandeau RGPD) : le site n'a que Google Analytics, on masque
   la catégorie "marketing" et la case "j'accepte les mentions légales". */
#cg-ov .cg-it:has(#cg-marketing),
#cg-ov .cg-ck {
    display: none;
}

/* Référentiel annuel : logo du département en vignette dans le tableau des sources. */
.annuel-sources td.dep-icon img {
    width: 2rem;
    height: 2rem;
    margin: 0;
    object-fit: contain;
}

/* dep-table Table des départements (index du référentiel) */
.dep-table {
    width: 100%;
    border-collapse: collapse;
}
.dep-table th {
    text-align: left;
    padding: .5rem .75rem;
    border-bottom: 2px solid #2d5016;
}
.dep-table td {
    padding: .4rem .75rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
.dep-table td.dep-icon {
    width: 160px;
}
.dep-table td.dep-icon img {
    height: 30px;
}
.dep-table a:hover {
    text-decoration: underline;
}
.dep-table td.dep-icon img {
    margin: 0;
}

svg.copy{
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
}

/* Cartes du blog : titre en graisse normale pour que le **gras** du titre ressorte */
e2-blog-item h2 strong,
e2-blog-item .text-xl strong {
    font-weight: 600;
}
