@font-face {
  font-family: 'SuisseIntl';
  src: url('/fonts/SuisseIntl-Regular.ttf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SuisseIntl';
  src: url('/fonts/SuisseIntl-SemiBold.ttf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ACRealAdult';
  src: url('/fonts/ACRealAdult.ttf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --header-height: 60px;
  --footer-height: 60px;
  --today-font-color: #5167F4;  
  --today-border-color: #5167F4;
  --gap: 24px;
  --fixed-contact-right: 50px;
  --fixed-contact-top: 95%;
  --fixed-contact-bg: white;
  --fixed-contact-color: black;
  --fixed-contact-padding: 8px 14px;
  --fixed-contact-radius: 999px;
}

*{box-sizing: border-box;}
html,body{height:100%; margin:0; font-family: 'SuisseIntl', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;}
body{
  background-image: 
    linear-gradient(#FBFBFB .1em, transparent .1em),
    linear-gradient(90deg, #FBFBFB .1em, transparent .1em);
  background-size: 1em 1em;
}

.site-header { border-bottom: 1px solid #e6e6e6; background: transparent; height: var(--header-height); display: flex; align-items: center; padding: 40px; }
.header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.brand .brand-name {
  font-family: "ACRealAdult";
  font-weight: 700;
  font-size: 73px;
  letter-spacing: -0.02em;
  color: #111;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  margin-left: 50px;
  margin-right: 50px;

}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 3px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 300;
  line-height: 14px;
  letter-spacing: -.5px;
  color: #111;
  cursor: pointer;
}

.legend-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: end;
  width: 100%;
  gap: 12px;
  margin-top: 20px;
}

.category-legend {
  display: grid;
  grid-template-columns: repeat(2, auto); 
  column-gap: 6px;
  row-gap: 0px;
  align-items: start;
  justify-content: flex-end;
  white-space: nowrap;
}

.legend-separator {
  width: 1px;
  background: #e6e6e6;
  border-radius: 1px;
  margin: 0 8px;
  align-self: stretch;
}

.source-legend {
  display: grid;
  grid-template-columns: repeat(2, auto);
  column-gap: 6px;
  row-gap: 0px;
  justify-content: end;
  align-items: start;
  width: auto;
  margin-top: 0;
  padding-right: 0;
}

.category-label, .source-label {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-item .source-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}

.category-name, .source-name {
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
}

.category-count {
  font-size: 11px;
  line-height: 1;
  vertical-align: super; 
  /* opacity: 0.65; */
  font-variant-numeric: tabular-nums;
}

.days-grid {
  display: flex;
  gap: var(--gap);
  height: 100%;
}

.day-card {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
  height: 100%;
}

.day-label.is-today {
  color: var(--today-font-color);
  border-bottom-color: var(--today-border-color); 
}

.articles {
  overflow-y: auto;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
}

.article {
  padding: 8px;
  border-bottom: 1px solid #e6e6e6;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, filter 180ms ease;
}

.article.source-highlight {
  box-shadow: 0 12px 30px /* rgba(18, 35, 60, 0.12) */ white;
  /* transform: translateY(-4px); */
  z-index: 5;
  position: relative;
}

.article.source-dimmed {
  display: none;
}

.legend-item.legend-active {
  outline: 2px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.03);
}

.legend-toggle {
  display: none;
}

.article .article-category {
  display: none;  
}

.article.has-category .title {
  margin-top: 0;
}

.article .title {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 14px;
  letter-spacing: -.5px;
  color: #111;
}

.article a { color: inherit; text-decoration: none; display:block; }

.title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
}


.article {
  transition: opacity 160ms ease;
}

.article a .title:hover {
  background: linear-gradient(90deg,#fff8e1,#fff4d6);
  color: #0b0b0b;
  border-radius: 6px;
}

.source-dot {
  width: 10px;
  height: 10px;
  border-radius: 0%;
  flex: 0 0 10px;
  display: inline-block;
  vertical-align: center;
}

.empty-note {
  padding: 8px;
  border-bottom: 1px solid #e6e6e6;
  text-decoration: none;
  color: inherit;
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: -.5px;
}

.day-label {
  padding: 14px 0px;
  font-weight: 700;
  font-size: 23px;
  line-height: 28px;
  letter-spacing: -.5px;
  border-bottom: 2px solid #000000;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
}
.day-label .day-label-text { display: inline-block; }
/* .day-label .day-count { font-weight: 400; letter-spacing: -.5px; font-size: 14px; align-self: flex-start; margin-left: 2px; margin-top: -4px; } */
.day-label .day-toggle-icon { 
  font-size: 18px; 
  line-height: 1; 
  color: black; 
  border-radius: 4px; 
  background: transparent; 
  border: none; 
  transition: transform 150ms ease; 
  cursor: pointer; 
  display: inline-flex;    /* pour pouvoir centrer le svg à l'intérieur */
  align-items: center;
  justify-content: center;
  margin-left: auto; 
}

.day-label.is-today .day-toggle-icon {
  color: var(--today-font-color) !important;
}

.day-toggle-icon svg circle {
  fill: currentColor;
  stroke: currentColor;
}

button, svg {
  padding: 0;
  margin: 0;
}

.day-card:not(:has(.articles)) .day-toggle-icon { transform: rotate(90deg); }
.day-card:has(.articles) .day-toggle-icon { transform: rotate(0deg); }

.day-label.is-today, .day-label .day-label-text.is-today { font-weight: 800; }

/* .day-label .day-count { align-self: flex-start; } */

.day-label.is-today,
.day-card .day-label.is-today,
.day-label .day-label-text.is-today {
  color: var(--today-font-color);
  border-bottom-color: var(--today-border-color);
}

.fixed-contact {
  position: fixed;
  right: var(--fixed-contact-right);
  top: var(--fixed-contact-top);
  transform: translateY(-50%);
  background: var(--fixed-contact-bg);
  color: var(--fixed-contact-color);
  padding: var(--fixed-contact-padding);
  border-radius: var(--fixed-contact-radius);
  border: 1px solid #e6e6e6;
  font-size: 15px;
  font-weight: 300;
  line-height: 14px;
  letter-spacing: -.3px;
  text-decoration: none;
  z-index: 9999;
  display: inline-block;
}

@media (max-width: 721px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  .main {
    height: auto;
    display: block;
    flex-direction: column;
    gap: 12px;
    margin-left: 20px;
    margin-right: 20px;
    box-sizing: border-box;
  }

  .legend-wrapper {
    position: fixed;
    right: 20px;
    bottom: 24px;
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
    max-width: 260px;
    background: #ffffff;
    padding: 10px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    z-index: 9999;
  }

  .category-legend {
    display: grid;
    grid-template-columns: repeat(1, auto);
    column-gap: 4px;
    row-gap: 3px;
    justify-content: start;
    justify-items: start;
    align-items: start;
    text-align: left;
    padding: 0;
    margin: 0;
  }

  .legend-separator {
    width: 100%;
    height: 1px;
    background: #e6e6e6;
    border-radius: 1px;
    margin: 0;
    align-self: stretch;
  }

  .source-legend {
    display: grid;
    grid-template-columns: repeat(2, auto);
    column-gap: 4px;
    row-gap: 3px;
    justify-content: start;
    justify-items: start;
    align-items: start;
    text-align: left;
    padding: 0;
    margin: 0;
  }

  .legend-item {
    font-size: 14px;
    gap: 3px;
    padding: 2px 6px;
    letter-spacing: -.5px;
    line-height: 14px;
    justify-self: start;
    text-align: left;
  }

  .legend-item .source-dot { width: 10px; height: 10px; flex: 0 0 10px; }
  .category-count { font-size: 10px; }

  .days-grid {
    display: flex;
    flex-direction: column;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    height: 100%;
    box-sizing: border-box;
    padding-bottom:6px;
  }

  .days-grid::-webkit-scrollbar { width: 12px; height: 12px; }
  .days-grid::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
  }
  
  .days-grid { 
      scrollbar-width: thin; 
      scrollbar-color: rgba(0,0,0,0.12) transparent; 
  }

  .day-card {
    flex: none;
    min-width: 0;
    height: auto !important;

  }
  .articles {
    overflow: visible !important;
    max-height: none !important;
    display: block;
  }

  .article {
    border-bottom: 1px solid #e6e6e6;
    background: transparent;
  }
  .article:last-child { margin-bottom: 0; border-bottom: none; }

  .title {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
      padding: 0px 0px;
    flex-direction: row-reverse;
  }

  .article .title {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 15px;
    letter-spacing: -.5px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .article a .title:hover {
    color: inherit;
    background: none;
  }

  .title .source-dot { width: 9px; height: 9px; flex: 0 0 9px; margin-top: 4px;}

  .fixed-contact {
    display: none;
  }

  .day-label {
    padding: 14px 0px;
    font-weight: 700;
    font-size: 27px;
    line-height: 28px;
    letter-spacing: -.5px;
    border-bottom: 2px solid #000000;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
  }
  .day-label .day-label-text { display: inline-block; }
  /* .day-label .day-count { font-weight: 400; letter-spacing: -.5px; font-size: 14px; align-self: flex-start; margin-left: 2px; margin-top: -4px; } */
  .day-label .day-toggle-icon { 
    font-size: 18px; 
    line-height: 1; 
    color: black; 
    border-radius: 4px; 
    background: transparent; 
    border: none; 
    transition: transform 150ms ease; 
    cursor: pointer; 
    display: inline-flex;    /* pour pouvoir centrer le svg à l'intérieur */
    align-items: center;
    justify-content: center;
    margin-left: auto; 
  }

  .day-card:not(:has(.articles)) .day-toggle-icon { transform: rotate(90deg); }
  .day-card:has(.articles) .day-toggle-icon { transform: rotate(0deg); }

  .day-label.is-today, .day-label .day-label-text.is-today { font-weight: 800; }

  /* .day-label .day-count { align-self: flex-start; } */

  .day-label.is-today,
  .day-card .day-label.is-today,
  .day-label .day-label-text.is-today {
    color: var(--today-font-color);
    border-bottom-color: var(--today-border-color);
  }

  .empty-note {
    padding: 8px;
    border-bottom: 1px solid #e6e6e6; 
    text-decoration: none;
    color: inherit;
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 14px;
    letter-spacing: -.5px;
  }  
}

@media (max-width: 480px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  .main {
    height: auto;
    display: block;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    margin-left: 20px;
    margin-right: 20px;
    box-sizing: border-box;
  }

  .legend-wrapper {
    position: fixed;
    right: 20px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
    max-width: 260px;
    background: #ffffff;
    padding: 10px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    z-index: 9999;
  }

  .category-legend {
    display: grid;
    grid-template-columns: repeat(1, auto);
    column-gap: 4px;
    row-gap: 3px;
    justify-content: start;
    justify-items: start;
    align-items: start;
    text-align: left;
    padding: 0;
    margin: 0;
  }

  .legend-separator {
    width: 100%;
    height: 1px;
    background: #e6e6e6;
    border-radius: 1px;
    margin: 0;
    align-self: stretch;
  }

  .source-legend {
    display: grid;
    grid-template-columns: repeat(2, auto);
    column-gap: 4px;
    row-gap: 3px;
    justify-content: start;
    justify-items: start;
    align-items: start;
    text-align: left;
    padding: 0;
    margin: 0;
  }

  .legend-item {
    font-size: 14px;
    gap: 3px;
    padding: 2px 6px;
    letter-spacing: -.5px;
    line-height: 14px;
    justify-self: start;
    text-align: left;
  }

  .legend-item .source-dot { width: 9px; height: 9px; flex: 0 0 9px; }
  .category-count { font-size: 10px; }

  .days-grid {
    display: flex;
    flex-direction: column;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    height: 100%;
    box-sizing: border-box;
    padding-bottom: 6px;
  }

  .days-grid::-webkit-scrollbar { width: 12px; height: 12px; }
  .days-grid::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
  }
  .days-grid { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.12) transparent; }

  .day-card {
    flex: none;
    min-width: 0;
    height: auto !important;

  }

  .articles {
    overflow: visible !important;
    max-height: none !important;
    display: block;
  }

  .article {
    border-bottom: 1px solid #e6e6e6;
    background: transparent;
  }
  .article:last-child { margin-bottom: 0; border-bottom: none; }

  .title {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    padding: 0px 0px;
    flex-direction: row-reverse;
  }

  .article a .title:hover {
    color: inherit;
    background: none;
  }

  .legend-toggle {
    display: none;
  }

  .legend-toggle {
    display: block;
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 10001;
    pointer-events: auto;
  }

  .toggler { width: 56px; }
  .toggler input { display: none; }

  .toggler label {
    display: block;
    position: relative;
    width: 56px;
    height: 28px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    background: white;
    cursor: pointer;
  }

  .toggler label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 25%;
    width: 20px;
    height: 20px;
    background-color: #d7062a;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
  }

  .toggler svg {
    position: absolute;
    top: 50%;
    left: 25%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    z-index: 2;
  }

  .toggler-on { opacity: 0; }
  .toggler-off { opacity: 1; }

  .toggler input:checked + label::after {
    left: 75%;
    background-color: #50ac5d;
  }

  .toggler input:checked + label svg { left: 75%; }
  .toggler input:checked + label .toggler-on { opacity: 1; }
  .toggler input:checked + label .toggler-off { opacity: 0; }

  .path {
    fill: none;
    stroke: #fff;
    stroke-width: 7px;
    stroke-linecap: round;
  }

  .legend-wrapper.is-closed {
    opacity: 0;
    transform: translateY(8px) ;
    pointer-events: none;
    visibility: hidden;
  }

  .legend-wrapper:not(.is-closed) {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .article .title {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 14px;
    letter-spacing: -.5px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .title .source-dot { width: 9px; height: 9px; flex: 0 0 9px; margin-top: 4px;}

  .fixed-contact {
    display: none !important;
  }

  .day-label {
    padding: 14px 0px;
    font-weight: 700;
    font-size: 27px;
    line-height: 28px;
    letter-spacing: -.5px;
    border-bottom: 2px solid #000000;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
  }

  .day-label .day-label-text { display: inline-block; }
  /* .day-label .day-count { font-weight: 400; letter-spacing: -.5px; font-size: 14px; align-self: flex-start; margin-left: 2px; margin-top: -4px; } */
  .day-label .day-toggle-icon { 
    font-size: 18px; 
    line-height: 1; 
    color: black; 
    border-radius: 4px; 
    background: transparent; 
    border: none; 
    transition: transform 150ms ease; 
    cursor: pointer; 
    display: inline-flex;    /* pour pouvoir centrer le svg à l'intérieur */
    align-items: center;
    justify-content: center;
    margin-left: auto; 
  }

  /* SVG chevaucheur */
  .day-toggle-icon .chev {
    display: block;
    width: 18px;
    height: 18px;
    transition: transform 150ms ease;
    transform-origin: center;
  }

  .day-card:not(:has(.articles)) .day-toggle-icon .chev { transform: rotate(90deg); }
  .day-card:has(.articles) .day-toggle-icon .chev { transform: rotate(0deg); }

  /* Fallback si :has() non supporté : tu peux utiliser la classe open (mise à jour en JS) */
  .day-toggle-icon.open .chev { transform: rotate(0deg); }
  .day-toggle-icon .chev { transform: rotate(90deg); } /* état par défaut si tu veux */

  /* bold pour 'aujourd'hui' */
  .day-label.is-today, .day-label .day-label-text.is-today { font-weight: 800; }

  /* sr-only pour lecteurs d'écran */
  .sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
  }

  .day-label .day-toggle-icon { 
    font-size: 18px; 
    line-height: 1; 
    color: black; 
    border-radius: 4px; 
    background: transparent; 
    border: none; 
    transition: transform 150ms ease; 
    cursor: pointer; 
    margin-left: auto; 
  }

  /* .day-label .day-count { align-self: flex-start; } */

  .day-label.is-today,
  .day-card .day-label.is-today,
  .day-label .day-label-text.is-today {
    color: var(--today-font-color);
    border-bottom-color: var(--today-border-color);
  }

  .empty-note {
    padding: 8px;
    border-bottom: 1px solid #e6e6e6;
    text-decoration: none;
    color: inherit;
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 14px;
    letter-spacing: -.5px;
  } 
}