/* ==========================================================
   Bruce Theme — Base Styles
   ----------------------------------------------------------
   Minimal, flexible and dynamic starter CSS for Bruce Theme.
   Colors and fonts come from the Branding options.
   ========================================================== */

/* ---------- RESET / NORMALIZE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary, 'Inter'), sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-dark, #061826);
  background-color: var(--color-light, #fff);
}

:root {
  --bruce-content-width: 1280px;
  --cta-n-bg: #ece431;
  --cta-n-tx: #061c2f;
  --cta-n-bc: #ece431;
  --cta-n-bw: 2px;
  --cta-n-radius: 4px;
  --cta-n-px: 24px;
  --cta-n-py: 10px;

  --cta-h-bg: transparent;
  --cta-h-tx: #061c2f;
  --cta-h-bc: #ece431;
}

/* ---------- GLOBAL ELEMENTS ---------- */
a {
  color: var(--color-primary, #26547C);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent, #21D19F);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(100%, var(--bruce-content-width));
  margin-inline: auto;
  padding: 0 2rem;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary, 'Lato'), sans-serif;
  color: var(--color-primary, #26547C);
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.2em;
}

strong {
  font-weight: 700;
}

/* ---------- HEADER ---------- */
.site-header {
    background-color: #fff;
    color: var(--color-primary, #26547C);
    z-index: 50;
    position: sticky;
    top: 0;
}

.site-header .site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.site-logo {
	margin: .6rem 0;
}
.site-logo img {
  max-height: 50px;
  height: auto;
  display: block;
}

/* --- Bouton burger --- */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle .bar {
  width: 24px;
  height: 2px;
  background-color: var(--color-primary, #26547C);
  transition: all 0.3s ease;
}

/* --- Navigation & réseaux (mobile first) --- */

.site-social {
  display: none;
  width: 100%;
}

.site-header.active .site-social {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Social menu --- */
.social-menu {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0.75rem 0 0.25rem;
}

.social-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-menu a .icon {
  background-color: var(--color-primary);
  transition: background-color 0.25s ease;
}
.social-menu a:hover .icon {
  background-color: var(--color-accent);
  transition: background-color 0.25s ease;
}

/* Icônes SVG via mask */
.social-menu .icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: var(--color-light);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

/* Accessibilité : cache visuel du texte */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Animation burger --- */
.site-header.active .nav-toggle .bar:nth-child(1) {
  transform: rotate(45deg) translateY(5px)  translateX(5px);
}
.site-header.active .nav-toggle .bar:nth-child(2) {
  opacity: 0;
}
.site-header.active .nav-toggle .bar:nth-child(3) {
  transform: rotate(-45deg) translateY(-5px) translateX(5px);
}

/* --- TopBar Nav -- */
.site-topbar {
  background: var(--color-dark, #061826);
  color: #fff;
  font-size: 14px;
}

.site-topbar a {
  color: inherit;
  text-decoration: none;
}

.site-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem 0;
}

/* ---------------------------------------------------------
 * BACK TO TOP
 * --------------------------------------------------------- */

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    padding: 0;
    border: 0;
    border-radius: 50%;

    font-size: 1.2rem;

    cursor: pointer;
	
	background: var(--color-dark);
	color: var(--color-light);

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
}

.back-to-top:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* ---------- MAIN ---------- */
/* 1) Par défaut : tous les blocs dans .site-main sont contraints à la largeur "contenu" */
.site-main > * {
  max-width: var(--wp--style--global--content-size, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

/* 2) Blocs "wide" : un peu plus larges */
.site-main > .alignfull {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* 3) Blocs full width : bandeaux, sections, map, etc. */
.site-main > .alignfull {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background-color: var(--color-dark, #061826);
  color: var(--color-light, #E5E1EE);
  text-align: center;
  padding: 0 1rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.site-footer a {
  color: var(--color-light, #E5E1EE);
}
.site-footer a:hover {
  color: var(--color-accent, #21D19F);
}
.footer-brand img{
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}
.site-footer ul{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.site-footer .footer-social ul{
  flex-direction: row;
  gap:1rem;
}
.footer-social .social-menu a .icon{
  background-color: var(--color-light);
}
.footer-social .social-menu a:hover .icon{
  background-color: var(--color-accent);
}
.footer-nav{
  padding: 2rem 0;
}
.site-footer p {margin: 0;}

.footer-bottom {
  padding: 2rem 0 1rem;
}
.footer-credit{
  margin-top: 35px;
}
.footer-credit p{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.footer-credit svg {
    height: 50px;
    width: auto;
    display: block;
    fill: var(--color-light);
}

/* ---------- BUTTONS ---------- */
button, .btn {
  background-color: var(--color-light, #26547C);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-primary, 'Inter'), sans-serif;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

button.is-active,
.btn.is-active,
button:hover,
.btn:hover {
  color: #fff;
}

/* CTA – mobile-first */
.glad-cta{
  display:inline-block;
  width: 90%;
  max-width: 350px;
  text-align:center;
  text-decoration:none;
  font-weight:600;
  padding: 12px 20px;
  transition: color .2s, background-color .2s, border-color .2s, transform .08s;
}
.glad-cta:active{ transform: translateY(1px); }


/* ---------- CONTENT / ARTICLES ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}
.card .post-content h2 {
  margin-top: 0;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.post-card-title, .archive-card-title {
  font-size: 1.4rem;
  margin: 1rem 0 0;
}

.post-card-excerpt, .archive-card-excerpt {
  color: var(--color-dark, #333);
}

.archive-card-meta {
  font-size: 0.9rem;
  color: var(--color-accent, #90BEDE);
  margin-bottom: 0.8rem;
}

.list-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.card {
    flex: 1 1 100%;
    max-width: 100%;
  }

/* =======================================
   SINGLE POST
   ======================================= */
.single-post .post-article {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.post-categories a {
  color: var(--color-accent);
  text-transform: uppercase;
  font-weight: 600;
}

.post-title {
  font-size: 2rem;
  color: var(--color-primary);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-secondary);
}

.post-meta img {
  border-radius: 50%;
  vertical-align: middle;
}

.post-thumbnail img {
  width: 100%;
  border-radius: 6px;
}

.post-content {
  line-height: 1.8;
  color: var(--color-dark);
}

.post-content h2,
.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content p {
  margin-bottom: 1.2em;
}

.article-hero__inner {
	padding: 0;
	display: flex;
    flex-direction: column;
}
.article-hero.alignfull .article-hero__inner { padding: 3rem 1.5rem; }

.article-hero__overlay {
  background-color: var(--bruce-hero-overlay-color, var(--color-light));
}
.article-hero__title {
	color: var(--bruce-hero-title-color, var(--color-primary));
}

.post-hero-meta__cat {
	color: var(--bruce-hero-cat-color, var(--color-dark));
}

.post-hero-meta__date {
	color: var(--bruce-hero-date-color, var(--color-dark));
}

.article-hero--center .article-hero__inner,
.article-hero--center .post-hero-meta{
    align-items: center;
	justify-content: center;
}
.article-hero--left .article-hero__inner,
.article-hero--left .post-hero-meta{
    align-items: flex-start;
	justify-content: flex-start;
}
.article-hero--right .article-hero__inner,
.article-hero--right .post-hero-meta{
    align-items: flex-end;
	justify-content: flex-end;
}


/* --- Tags --- */
.post-tags {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  align-items: center;
}

.post-tags span {
  font-weight: 600;
  color: var(--color-dark);
}

.tag-link {
  background-color: var(--color-light);
  border: 1px solid var(--color-secondary);
  border-radius: 3px;
  padding: 0.25rem 0.5rem;
  color: var(--color-primary);
  transition: background-color 0.2s ease;
}

.tag-link:hover {
  background-color: var(--color-accent);
  color: #fff;
}

/* --- Navigation entre articles --- */
.post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 1.5rem;
}

.post-navigation a {
  color: var(--color-primary);
  font-weight: 600;
}

.post-navigation a:hover {
  color: var(--color-accent);
}

/* ==========================================================
   ARCHIVES
   ========================================================== */

.archive-thumbnail {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  max-height: 30rem;
  width: 100%;
}

.archive-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.archive-filters {
	display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.post-filters,
.post-subfilters {
  margin: 2rem 0;
  display: flex;
  gap: .5rem;
  flex-direction: column;
}

.post-filters a,
.post-subfilters a {
  display: flex;
  background: none;
  color: var(--color-primary);
  border-radius: 40px;
  justify-content: center;
  border: 1px solid var(--color-primary);
  padding: 0 1rem;
  transition: .5s ease-in-out;
}

.post-filters a.active,
.post-filters a:hover {
  background: var(--color-primary);
  color: var(--color-light);
  transition: .5s ease-in-out;
}

.post-subfilters {
  margin-top: -1rem;
  margin-bottom: 2rem;
}
.post-subfilters a {
  background: none;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  transition: .5s ease-in-out;
}
.post-subfilters a.active,
.post-subfilters a:hover {
  background: var(--color-accent);
  color: var(--color-light);
  transition: .5s ease-in-out;
}

.archive-card-body {
  padding: 1rem;
}

.blog .pagination,
.archive .pagination {
  display: flex;
  width: 100%;
  justify-content: center;
}

.blog .pagination .nav-links,
.archive .pagination .nav-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.blog .pagination .nav-links .current,
.archive .pagination .nav-links .current {
  color: var(--color-accent);
}
.blog .pagination .nav-links .a:hover,
.archive .pagination .nav-links .a:hover {
  color: var(--color-accent);
}

/* ==========================================================
   AUTRES
   ========================================================== */

/* --- Commentaires --- */
.comment-respond,
.comments-area {
  margin-top: 3rem;
  background-color: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  padding: 1.5rem;
  border-radius: 6px;
}


/* ---------- 404 PAGE ---------- */
.error-404 {
  text-align: center;
  padding: 4rem 1rem;
}

.error-404 h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ---------- UTILITIES ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ==========================================================
   FORCE ALIGNFULL (override global)
   ========================================================== */
.site-main > .alignfull {
  max-width: none !important;
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.post-hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin: 0 auto 1rem ;
  padding: 0;
  width: 100%;
  gap: 16px;
  max-width: var(--wp--style--global--content-size, 1280px);
}

.post-hero-meta__cat a {
  text-transform: uppercase;
  font-weight: 600;
  color:inherit;
}


/* ---------- DESKTOP (≥720px) ---------- */
@media (min-width: 720px) {
  .site-header .site-header-inner {
    flex-wrap: nowrap;
    background-color: #fff;
  }

  .site-social {
    display: flex !important;
    width: auto;
    justify-content: flex-end;
  }

  .footer-nav {
   padding:0;
  }

  .footer-credit p{
    flex-direction: row;
  }

  .card--full {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .card--half {
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }

  .card--third {
    flex: 1 1 calc(33.333333% - 1rem);
    max-width: calc(33.333333% - 1rem);
  }

  .archive-filters {
		gap: 0;
	}
	.post-filters,
	.post-subfilters {
		flex-direction: row;
	}
	.post-subfilters a {
		font-size: 1rem;
	}
  .post-hero-meta {
    margin: 0 auto 1rem !important;
		flex-direction: row !important;
		gap: 16px !important;
	}
  .post-article h2 {
		font-size: 2rem !important;
	}
  
}