:root {
  --bg: #0b0b0b;
  --card: #131313;
  --fg: #f5f5f5;
  --muted: #bdbdbd;
  --line: #2a2a2a;
  --input-bg: #0f0f0f;
  --site-header-offset: 5.25rem;
}

[data-theme="light"] {
  --bg: #f7f7f7;
  --card: #ffffff;
  --fg: #111111;
  --muted: #4e4e4e;
  --line: #d2d2d2;
  --input-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--site-header-offset);
}

body {
  margin: 0;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body > main {
  padding-top: var(--site-header-offset);
}

a {
  color: var(--fg);
  text-decoration: none;
}

.row{
    display: flex;
    flex-wrap: wrap;
}

.col-md-6{
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
}

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

@media(min-width:768px){

    .col-md-6{
        width: 50%;
    }

}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  border-bottom: none;
  margin-top: 3rem;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  align-items: start;
  padding: 1.5rem 0;
}

.footer-heading {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.footer-logo {
  display: inline-block;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.footer-logo:hover {
  text-decoration: underline;
}

.footer-brand .meta {
  margin: 0.25rem 0;
}

.footer-line {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.footer-line:last-child {
  margin-bottom: 0;
}

.footer-label {
  color: var(--muted);
  font-size: 0.8rem;
  min-width: 4.5rem;
}

.footer-nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-nav a {
  font-size: 0.9rem;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  padding: 0;
  cursor: pointer;
}

.theme-icon {
  display: block;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--fg);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.25s ease, opacity 0.25s ease;
  content: "";
}

.menu-icon {
  position: relative;
}

.menu-icon::before {
  position: absolute;
  top: -7px;
}

.menu-icon::after {
  position: absolute;
  top: 7px;
}

.menu-toggle.is-open .menu-icon {
  background: transparent;
}

.menu-toggle.is-open .menu-icon::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .menu-icon::after {
  transform: translateY(-7px) rotate(-45deg);
}

#post_intro {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* nombre maximum de lignes */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn,
button {
  display: inline-block;
  border: 1px solid var(--fg);
  color: var(--fg);
  background: transparent;
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

.btn:hover,
button:hover {
  background: var(--fg);
  color: var(--bg);
}

.hero,
.section {
  padding: 2rem 0;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-lead {
  margin: 0 0 1.25rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.process-intro {
  margin: 0 0 1rem;
  max-width: 40rem;
}

.process-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.process-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.process-step-num {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.process-step-title {
  margin: 0;
  font-size: 1rem;
}

.process-step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.home-prefooter-text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.home-prefooter-text a {
  word-break: break-word;
}

.home-prefooter-actions {
  margin: 0;
}

.section-actions {
  margin: 1.25rem 0 0;
}

.blog-toolbar-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.blog-search-label {
  display: block;
  margin-bottom: 0.35rem;
}

.blog-search-row {
  --blog-search-h: calc(0.6rem + 0.6rem + 1.6em + 2px);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.blog-search-input {
  flex: 1 1 200px;
  min-width: 0;
  width: auto;
  height: var(--blog-search-h);
  min-height: var(--blog-search-h);
  box-sizing: border-box;
}

.blog-search-submit,
.blog-filters-toggle {
  flex: 0 0 var(--blog-search-h);
  width: var(--blog-search-h);
  min-width: var(--blog-search-h);
  height: var(--blog-search-h);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fg);
  color: var(--fg);
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.blog-search-submit:hover {
  background: var(--fg);
  color: var(--bg);
}

.blog-filters-toggle:hover {
  background: var(--fg);
  color: var(--bg);
}

.blog-toolbar-icon {
  display: block;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
}

.blog-filters-toggle:hover .blog-toolbar-icon {
  color: inherit;
}

.blog-filters-panel:not(.is-open) {
  display: none;
}

.blog-filters-panel.is-open {
  display: block;
}

.blog-filters-panel-inner {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  align-items: end;
}

.blog-filters-panel .blog-filter-field label {
  display: block;
  margin-bottom: 0.35rem;
}

.blog-panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-items: stretch;
  grid-column: 1 / -1;
}

.blog-panel-actions button[type="submit"],
.blog-panel-actions .blog-btn-reset {
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  margin: 0;
}

.blog-panel-actions .blog-btn-reset {
  text-decoration: none;
  line-height: 1;
}

.blog-empty {
  margin: 0;
}

.related-posts-title {
  margin-top: 0;
}

.related-posts-title .meta {
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
}

@media (max-width: 520px) {
  .blog-filters-panel-inner {
    grid-template-columns: 1fr;
  }
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1rem;
}

.card img,
.post-cover {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.post-detail-article .post-body {
  --post-body-img-max-height: min(70vh, 36rem);
}

.post-detail-article .post-body img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: var(--post-body-img-max-height);
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 1.25rem auto;
}

.post-detail-article .post-body figure {
  margin: 1.25rem auto;
  max-width: 100%;
  text-align: center;
}

.post-detail-article .post-body figure img {
  display: inline-block;
  margin: 0.5rem auto;
  max-height: var(--post-body-img-max-height);
  vertical-align: middle;
}

.service-detail-intro img {
  max-height: 220px;
  object-fit: cover;
}

.service-detail-summary {
  margin: 0.75rem 0 0;
}

.service-details {
  margin-top: 1rem;
}

.service-details :first-child {
  margin-top: 0;
}

.service-details h2,
.service-details h3 {
  margin: 1.1rem 0 0.5rem;
  font-size: 1.05rem;
}

.service-details h2 {
  font-size: 1.15rem;
}

.service-details p {
  margin: 0.65rem 0;
  font-size: 0.95rem;
}

.service-details ul,
.service-details ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}

.service-details li {
  margin-bottom: 0.35rem;
}

.service-detail-back {
  margin: 1.25rem 0 0;
}

form {
  display: grid;
  gap: 0.85rem;
}

input,
textarea,
select {
  width: 100%;
  background: var(--input-bg);
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 0.6rem;
  font-family: inherit;
}

label {
  font-size: 0.95rem;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.65rem;
  text-align: left;
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
  align-items: start;
}

.contact-col h2 {
  margin-top: 0;
}

.about-contact-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.about-contact-lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Page CV (A propos) */
.cv-page .cv-header {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 280px);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

.cv-name {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  letter-spacing: 0.04em;
}

.cv-tagline {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
}

.cv-summary {
  margin: 0;
  font-size: 0.95rem;
}

.cv-contact {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

.cv-contact li {
  margin-bottom: 0.5rem;
}

.cv-contact li:last-child {
  margin-bottom: 0;
}

.cv-contact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.cv-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: start;
}

.cv-section-title {
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cv-entry {
  margin-bottom: 1.25rem;
}

.cv-entry:last-child {
  margin-bottom: 0;
}

.cv-entry--compact {
  margin-bottom: 1rem;
}

.cv-entry-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.cv-entry-title {
  margin: 0;
  font-size: 1rem;
  flex: 1 1 100%;
}

.cv-entry-org {
  font-size: 0.9rem;
  color: var(--muted);
}

.cv-entry-dates {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: auto;
}

.cv-bullets {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.cv-bullets li {
  margin-bottom: 0.35rem;
}

.cv-entry-text {
  margin: 0;
  font-size: 0.9rem;
}

.cv-skill-group {
  margin-bottom: 1rem;
}

.cv-skill-group:last-child {
  margin-bottom: 0;
}

.cv-skill-heading {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.cv-tags {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.cv-lang-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.cv-lang-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.cv-lang-list li:last-child {
  border-bottom: none;
}

@media (max-width: 992px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .header-right {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    position: relative;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: min(280px, 90vw);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border: 1px solid transparent;
    background: var(--bg);
    padding: 0;
  }

  .nav a {
    padding: 0.45rem 0.75rem;
  }

  .nav.is-open {
    max-height: 280px;
    opacity: 1;
    border-color: var(--line);
    padding: 0.75rem 0;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .cv-page .cv-header {
    grid-template-columns: 1fr;
  }

  .cv-contact {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 1rem;
  }

  .cv-grid {
    grid-template-columns: 1fr;
  }

  .cv-entry-dates {
    margin-left: 0;
    flex-basis: 100%;
  }
}
