/* Style de lecture pour les articles — Apple-like épuré */
:root {
  --bg: #fff;
  --fg: #111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --link: #0a84ff;
  --max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --fg: #f5f5f7;
    --muted: #9aa0a6;
    --line: #27272a;
    --link: #0a84ff;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 18px/1.8 -apple-system, system-ui, "SF Pro Text", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

header.site {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #1A172B 0%, #4C1D95 50%, #5B21B6 100%) !important;
  border-bottom: none;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(92, 33, 182, 0.3);
  overflow: visible;
  width: 100%;
}

nav.bar {
  display: flex;
  align-items: stretch;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100px;
}

.brand {
  font-weight: 800;
  letter-spacing: 1px;
  color: #7B50E6;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  margin: 0;
  margin-left: -24px;
  gap: 20px;
}

.brand a {
  color: #7B50E6;
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0;
}

.brand-text-container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.brand-left .line-1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #7B50E6;
}

.brand-left .line-2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #7B50E6;
  padding-left: 8px;
}

.brand-left .line-3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #7B50E6;
}

.brand-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  line-height: 1.4;
  margin-top: 0;
  padding-left: 8px;
}

.brand-right span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #7B50E6;
  display: block;
  white-space: nowrap;
  transform-origin: top left;
}

.brand-right span:nth-child(1) {
  transform: rotate(-25deg);
}

.brand-right span:nth-child(2) {
  transform: rotate(-7.5deg);
}

.brand-right span:nth-child(3) {
  transform: rotate(10deg);
}

.brand-right span:nth-child(4) {
  transform: rotate(17deg);
}

nav .spacer {
  flex: 1;
}

nav .menu {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

nav .menu a {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 12px;
}

nav .menu a:hover {
  background: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transform: translateY(-1px);
}

nav .search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

nav .search svg {
  color: #fff;
  opacity: 0.9;
}

nav .search input[type="search"] {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  padding: 4px 8px;
  width: 200px;
  outline: none;
}

nav .search input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

nav .search input[type="search"]:focus {
  outline: none;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
  position: relative;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Layout principal avec article + sidebar */
.article-layout {
  display: flex;
  gap: 48px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 24px;
  align-items: flex-start;
}

main.article {
  flex: 0 0 75%;
  min-width: 0;
  padding: 0 0 0 24px;
  order: 2;
  max-width: 900px;
}

main.article>header {
  margin-bottom: 32px;
}

/* Sidebar des autres articles - À GAUCHE */
.sidebar {
  flex: 0 0 25%;
  min-width: 0;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  order: 1;
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding-right: 32px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

/* Style de la scrollbar pour la sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.sidebar h3 {
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

.sidebar-article {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.sidebar-article:hover {
  opacity: 0.8;
  padding-left: 4px;
  background: linear-gradient(90deg, var(--line) 0%, transparent 100%);
}

.sidebar-article:first-of-type {
  padding-top: 0;
}

.sidebar-article:last-child {
  border-bottom: none;
}

.sidebar-article-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  padding: 3px 8px;
  background: linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  border-radius: 3px;
  color: #fff;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.6px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(10, 132, 255, 0.2);
}

.sidebar-article-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-article-date {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin: 2px 0 0 0;
  text-transform: none;
  letter-spacing: 0.2px;
  opacity: 0.7;
}

h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-top: 40px;
  margin-bottom: 12px;
}

p {
  margin: 0 0 18px 0;
  color: var(--fg);
}

.lead {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 24px;
}

.byline {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 16px;
}

img {
  max-width: 100%;
  max-height: 350px;
  width: auto;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

blockquote {
  border-left: 3px solid var(--line);
  padding: 8px 16px;
  color: var(--muted);
  margin: 24px 0;
  font-style: italic;
}

pre,
code {
  background: var(--line);
  color: var(--fg);
  border-radius: 8px;
  padding: 4px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}

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

a:hover {
  text-decoration: underline;
}

/* Styles pour les éléments d'article */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  background: linear-gradient(135deg, #7B50E6 0%, #9D6FFF 100%);
  border-radius: 6px;
  color: #fff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(123, 80, 230, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 80, 230, 0.35);
  background: linear-gradient(135deg, #6D3ED4 0%, #8B5DED 100%);
}

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  background: var(--line);
  border-radius: 6px;
  color: var(--muted);
  margin-right: 6px;
}

figure.cover {
  margin: 32px 0;
}

figure.cover img {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: 12px;
  margin: 0;
}

figure.cover .video-embed {
  width: 100%;
  position: relative;
  padding-bottom: 56.25%;
  /* Ratio 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 0;
}

figure.cover .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

figure.cover figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
  font-style: italic;
}

figure {
  margin: 32px 0;
}

figure img {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: 12px;
  margin: 0;
}

figure figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
  font-style: italic;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}

ul,
ol {
  margin: 18px 0;
  padding-left: 24px;
}

ul li,
ol li {
  margin: 8px 0;
}

h3 {
  font-size: clamp(20px, 2.5vw, 24px);
  margin-top: 32px;
  margin-bottom: 12px;
}

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 24px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

footer.site .container {
  max-width: var(--max);
  margin: 0 auto;
}

footer.site .cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Ligne de partage compacte */
.share-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.share-line-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 8px;
}

.share-line-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.share-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: transparent;
}

.share-icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  color: inherit;
}

.share-icon-btn[data-platform="whatsapp"] {
  background: #25D366 !important;
  border-color: #25D366 !important;
}

.share-icon-btn[data-platform="whatsapp"] svg {
  fill: #fff !important;
  color: #fff !important;
}

.share-icon-btn[data-platform="whatsapp"] svg path {
  fill: #fff !important;
}

.share-icon-btn[data-platform="facebook"] {
  background: #1877F2 !important;
  border-color: #1877F2 !important;
}

.share-icon-btn[data-platform="facebook"] svg {
  fill: #fff !important;
  color: #fff !important;
}

.share-icon-btn[data-platform="facebook"] svg path {
  fill: #fff !important;
}

.share-icon-btn[data-platform="twitter"] {
  background: #000 !important;
  border-color: #000 !important;
}

.share-icon-btn[data-platform="twitter"] svg {
  fill: #fff !important;
  color: #fff !important;
}

.share-icon-btn[data-platform="twitter"] svg path {
  fill: #fff !important;
}

.share-icon-btn[data-platform="linkedin"] {
  background: #0A66C2 !important;
  border-color: #0A66C2 !important;
}

.share-icon-btn[data-platform="linkedin"] svg {
  fill: #fff !important;
  color: #fff !important;
}

.share-icon-btn[data-platform="linkedin"] svg path,
.share-icon-btn[data-platform="linkedin"] svg rect,
.share-icon-btn[data-platform="linkedin"] svg circle {
  fill: #fff !important;
}

.share-icon-btn[data-platform="sms"] {
  background: #34C759 !important;
  border-color: #34C759 !important;
}

.share-icon-btn[data-platform="sms"] svg {
  stroke: #fff !important;
  fill: none !important;
  color: #fff !important;
}

.share-icon-btn[data-platform="sms"] svg path {
  stroke: #fff !important;
  fill: none !important;
}

.share-icon-btn[data-platform="email"] {
  background: #FF3B30 !important;
  border-color: #FF3B30 !important;
}

.share-icon-btn[data-platform="email"] svg {
  stroke: #fff !important;
  fill: none !important;
  color: #fff !important;
}

.share-icon-btn[data-platform="email"] svg path,
.share-icon-btn[data-platform="email"] svg polyline {
  stroke: #fff !important;
  fill: none !important;
}

.share-icon-btn[data-platform="copy"] {
  background: var(--link) !important;
  border-color: var(--link) !important;
}

.share-icon-btn[data-platform="copy"] svg {
  stroke: #fff !important;
  fill: none !important;
  color: #fff !important;
}

.share-icon-btn[data-platform="copy"] svg path,
.share-icon-btn[data-platform="copy"] svg rect {
  stroke: #fff !important;
  fill: none !important;
}

/* S'assurer que les SVG s'affichent correctement */
.share-icon-btn svg {
  pointer-events: none;
  vertical-align: middle;
}

.share-icon-btn svg * {
  pointer-events: none;
}

@media (max-width: 640px) {
  .share-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .share-line-buttons {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }

  .share-icon-btn {
    width: 38px;
    height: 38px;
  }

  .share-icon-btn svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
  }
}

/* Système de partage */
.share-container {
  position: relative;
  display: inline-block;
  margin: 24px 0;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--link);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.share-button:hover {
  background: #0066cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.share-button:active {
  transform: translateY(0);
}

.share-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.share-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
  overflow: hidden;
}

.share-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.share-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  color: var(--fg);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
}

.share-option:hover {
  background: var(--card);
}

.share-option:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.share-option:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.share-option svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.share-option-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Notification de copie */
.share-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--fg);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.share-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.share-notification.error {
  background: #ff3b30;
  color: #fff;
}

@media (max-width: 1024px) {
  .article-layout {
    flex-direction: column;
    gap: 40px;
    padding: 32px 20px;
  }

  .sidebar {
    width: 100%;
    flex: none;
    position: static;
    order: 2;
    border-right: none;
    border-top: 2px solid var(--line);
    padding-right: 0;
    padding-top: 32px;
  }

  main.article {
    flex: none;
    max-width: 100%;
    order: 1;
  }

  .sidebar h3 {
    font-size: 14px;
    margin-bottom: 16px;
  }
}

@media (max-width: 640px) {
  .menu-toggle {
    display: flex;
    order: -1;
    align-self: center;
  }

  nav .menu {
    display: none !important;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: linear-gradient(135deg, #1A172B 0%, #4C1D95 50%, #5B21B6 100%);
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(92, 33, 182, 0.3);
    gap: 0;
    border-radius: 0;
    backdrop-filter: blur(20px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
  }

  nav .menu.mobile-open {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  nav .menu a {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: left;
  }

  nav .menu a:last-child {
    border-bottom: none;
  }

  nav .search {
    display: flex !important;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    max-width: 48px;
    padding: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    order: 10;
    transition: max-width 0.3s ease, padding 0.3s ease;
    align-self: center;
  }

  nav .search.mobile-open {
    max-width: 300px;
    padding: 8px 16px;
  }

  nav .search input[type="search"] {
    width: 0;
    padding: 0;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  }

  nav .search.mobile-open input[type="search"] {
    width: 100%;
    padding: 4px 8px;
    opacity: 1;
  }

  nav.bar {
    height: 80px;
    position: relative;
    padding: 0 16px;
    overflow: visible;
  }

  .brand {
    font-size: 16px;
    padding: 0;
    margin-left: 0;
    max-width: calc(100% - 120px);
    order: 0;
    align-self: flex-start;
    padding-top: 8px;
  }

  .brand-text-container {
    gap: 12px;
  }

  .brand-left .line-1,
  .brand-left .line-2,
  .brand-left .line-3 {
    font-size: 12px;
    line-height: 1.1;
  }

  .brand-right span {
    font-size: 9px;
    line-height: 1.2;
  }

  nav .spacer {
    order: 5;
  }

  body.menu-open {
    overflow: hidden;
  }

  .article-layout {
    padding: 28px 16px;
  }

  main.article {
    font-size: 17px;
  }

  h1 {
    font-size: 32px;
  }

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

  .share-menu {
    left: auto;
    right: 0;
    min-width: 180px;
  }

  .share-button {
    padding: 10px 16px;
    font-size: 14px;
  }

  .sidebar {
    display: none;
    /* Masquer la sidebar sur mobile */
  }
}

/* Styles pour les vidéos intégrées */
.video-embed {
  position: relative;
  width: 100%;
  margin: 32px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding-bottom: 56.25%;
  /* Ratio 16:9 pour YouTube et Vimeo */
  height: 0;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-embed.twitter {
  padding-bottom: 0;
  height: auto;
  min-height: 400px;
}

.video-embed.twitter iframe {
  position: relative;
  height: auto;
  min-height: 400px;
  padding-bottom: 0;
}

@media (max-width: 640px) {
  .video-embed {
    margin: 24px 0;
    border-radius: 8px;
  }

  .video-embed.twitter {
    min-height: 300px;
  }

  .video-embed.twitter iframe {
    min-height: 300px;
  }
}