/* =====================================================================
   DAILYMOTION STATUS PAGE — CSS aligné sur le Figma (desktop 1680 / mobile 360)
   ===================================================================== */

/* Remove Atlassian mention */
a.color-secondary { visibility: hidden; }

/* Remove History */
a.history-footer-link { display: none; }

/* ===== POLICE DE MARQUE ABC FAVORIT ===== */
@font-face {
  font-family: 'ABC Favorit';
  src: url('https://faq.dailymotion.com/hc/theming_assets/01J2GWNP4HZV6AFDJ4EWDMGTAP');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'ABC Favorit';
  src: url('https://faq.dailymotion.com/hc/theming_assets/01J2GWNP1PWRV95W9K2F1RGZQ3');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'ABC Favorit';
  src: url('https://faq.dailymotion.com/hc/theming_assets/01J2GWNPRET0HAJ4P1BHEN4JWB');
  font-weight: 700; font-style: normal; font-display: swap;
}
/* ===== POLICE DAILYSANS (titres, dates, titres d'incident) ===== */
@font-face {
  font-family: 'DailySans';
  src: url('https://faq.dailymotion.com/hc/theming_assets/01J2GWNNKVJ4FZT6V08YAF6A51'); /* Median */
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DailySans';
  src: url('https://faq.dailymotion.com/hc/theming_assets/01J2GWNQ6H3RBPR4CQ102JHA6N'); /* Bulky */
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ===== TOKENS DU FIGMA ===== */
:root {
  --dm-text: #0D0D0D;            /* Generic/Text/Primary */
  --dm-text-alt: #232323;        /* Greyscale/09 Mine shaft */
  --dm-text-muted: #606060;      /* Generic/Text/Secondary */
  --dm-border: #F0F0F0;          /* Generic/Border/Primary */
  --dm-line: #DADADA;            /* timeline incidents */
  --dm-success: #1D7202;         /* Icon/Success */
  --dm-success-bright: #3FB41A;  /* barre bandeau + point badge */
  --dm-success-bg: #F2FBF0;
  --dm-warning: #DB9B06;         /* Status/Surface/Warning secondary */
  --dm-warning-bg: #FEFAE2;
  --dm-error: #EB1800;           /* Status/Surface/Error secondary */
  --dm-error-bg: #FFEAEA;
  --dm-investigating: #FF5757;   /* Brand/06 Persimmon */
  --dm-investigating-bg: rgba(255, 87, 87, .12);
  --dm-info: #4F3AFD;            /* Surface/Active */
  --dm-info-bg: #F1E8FD;         /* Surface/Selected alt */
  --dm-toggle-off: #767676;
  --dm-toggle-on: #0D0D0D;       /* état ON absent du Figma : à confirmer */

  --dm-font: 'ABC Favorit', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --dm-font-title: 'DailySans', var(--dm-font);
  --dm-font-incident: 'DailySans', var(--dm-font);
  --dm-font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body, .layout-content,
h1, h2, h3, h4, h5, p, small, strong,
.btn-default, button, a, input {
  font-family: var(--dm-font) !important;
}
body { color: var(--dm-text); }

/* ===== LARGEUR CONTENU : 928px + 12px de marge latérale ===== */
.layout-content .container {
  width: 100% !important;
  max-width: 952px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box;
}

/* ===== HEADER : 88px, logo à gauche, bouton à droite, centrés verticalement =====
   Le header est HORS du .container : on lui donne la même largeur ici.
   Note : pas de sélecteur d'enfant direct dans ce fichier : Statuspage
   échappe ce caractère et la règle entière est alors ignorée. */
html { overflow-x: clip; }
.masthead-container {
  width: 100% !important;
  max-width: 952px !important;
  margin: 0 auto !important;
  padding: 0 12px !important;
  box-sizing: border-box;
  border: none !important;
  background: transparent !important;
}
.masthead {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 88px;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}
.masthead::after {               /* divider sur toute la largeur de l'écran */
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 100vw; height: 1px;
  transform: translateX(-50%);
  background: var(--dm-border);
}
.masthead .clearfix { display: none; }
.masthead .logo-container {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: none;
}
.masthead .logo-container a { display: block; line-height: 0; }
/* « image 12 » est exportée en 192×88 avec de la marge autour du mot :
   on l'affiche à sa taille Figma exacte. */
.masthead .logo-container img {
  display: block;
  width: 192px !important;
  height: 88px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
}
/* Statuspage positionne le bouton en absolu avec un « top » calculé en JS */
.masthead .updates-dropdown-container {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: none;
}
.masthead .updates-dropdown {
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
}

/* ===== BOUTON SUBSCRIBE : noir + cloche ===== */
#show-updates-dropdown,
a.show-updates-dropdown {
  background: var(--dm-text) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 6px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  height: 40px;
  padding: 0 16px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
}
#show-updates-dropdown .subscribe-text-full,
#show-updates-dropdown .subscribe-text-short { display: none !important; }
#show-updates-dropdown::after { content: "Subscribe to updates"; white-space: nowrap; }
#show-updates-dropdown::before {
  content: "";
  display: inline-block;
  width: 20px; height: 20px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
}
#show-updates-dropdown:focus-visible { outline: 2px solid var(--dm-info); outline-offset: 2px; }

/* ===== BANDEAU DE STATUT ===== */
.page-status {
  border: none !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  text-align: left;
  padding: 20px 20px 20px 16px !important;
  margin: 24px 0 40px !important;
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-status .status,
.page-status h2.status,
.page-status .status.font-large {
  font-family: var(--dm-font) !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  color: var(--dm-text-alt) !important;
  margin: 0 !important;
}
.page-status.status-none {
  background: var(--dm-success-bg) !important;
  border-left: 4px solid var(--dm-success-bright) !important;
}
.page-status.status-none::before {
  content: ""; flex: none; width: 20px; height: 20px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%231D7202'/%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.page-status.status-minor       { background: var(--dm-warning-bg) !important; border-left: 4px solid var(--dm-warning) !important; }
.page-status.status-major,
.page-status.status-critical    { background: var(--dm-error-bg)   !important; border-left: 4px solid var(--dm-error)   !important; }
.page-status.status-maintenance { background: var(--dm-info-bg)    !important; border-left: 4px solid var(--dm-info)    !important; }

/* ===== TITRES DE SECTION (H2 Figma : DailySans Bulky 28/36) ===== */
.components-section .components-container::before,
#past-incidents {
  font-family: var(--dm-font-title) !important;
  font-size: 28px !important;
  line-height: 36px !important;
  font-weight: 700 !important;
  color: var(--dm-text) !important;
}
.components-section .components-container::before {
  content: "Dailymotion\2019s platforms";
  display: block;
  padding: 6px 0;               /* hauteur de ligne 48px */
  margin: 0 0 12px;
}

/* ===== ACCORDÉON DES COMPOSANTS ===== */
.components-section .components-container,
.components-section .component-container {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}
.components-section .component-container {
  border-bottom: 1px solid var(--dm-border) !important;
}
.components-section .component-container:first-of-type {
  border-top: 1px solid var(--dm-border) !important;
}

/* Ligne de composant : point | nom (colonne fixe) | badge | chevron */
.component-inner-container {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 20px 32px 20px 0 !important;
  border: none !important;
}
.component-inner-container .name {
  flex: 0 0 340px;              /* badge aligné à 348px du bord gauche */
  min-width: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: var(--dm-text);
}
.component-inner-container .component-status { float: none !important; }
.component-inner-container .tooltip-base,
.component-inner-container .icon-indicator,
.status-icon-button { display: none !important; }

/* Point coloré devant les composants parents (12px) */
.component-inner-container .name::before {
  content: ""; display: inline-block;
  width: 12px; height: 12px; border-radius: 50%;
  margin-right: 8px; vertical-align: -1px;
  background: var(--dm-success);
}
.status-yellow .name::before,
.status-orange .name::before { background: var(--dm-warning); }
.status-red    .name::before { background: var(--dm-error); }
.status-blue   .name::before { background: var(--dm-info); }

/* Groupe déplié : le badge du parent disparaît au profit des sous-composants.
   .dm-open est posée par le script du footer (fiable quel que soit le markup) ;
   les deux autres sélecteurs couvrent le comportement natif de Statuspage. */
.component-container.is-group.open .component-inner-container[data-js-hook="component-group-opener"] .component-status,
.component-inner-container:has([aria-expanded="true"]) .component-status {
  display: none !important;
}

/* Légende des statuts sous la liste : absente du Figma */
.component-statuses-legend { display: none !important; }

/* Sous-composants : 44px de haut, texte décalé de 24px, pas de point */
.child-components-container {
  padding: 0 0 16px !important;
  margin: 0 !important;
  border: none !important;
}
.child-components-container .component-inner-container {
  padding: 10px 32px 10px 0 !important;
}
.child-components-container .name {
  padding-left: 24px;
  box-sizing: border-box;
  font-weight: 400;
}
.child-components-container .name::before { display: none; }

/* ===== BADGE DE STATUT ===== */
.component-inner-container .component-status,
.update strong.dm-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 4px 12px;
  border-radius: 14px;
  font-family: var(--dm-font) !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 700 !important;
  color: var(--dm-text-alt) !important;
  background: var(--dm-success-bg);
  white-space: nowrap;
}
.component-inner-container .component-status::before,
.update strong.dm-badge::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dm-success-bright);
}
.status-yellow .component-status,
.status-orange .component-status { background: var(--dm-warning-bg); }
.status-yellow .component-status::before,
.status-orange .component-status::before { background: var(--dm-warning); }
.status-red .component-status { background: var(--dm-error-bg); }
.status-red .component-status::before { background: var(--dm-error); }
.status-blue .component-status { background: var(--dm-info-bg); }
.status-blue .component-status::before { background: var(--dm-info); }

/* ===== CHEVRON À DROITE (24px) ===== */
.group-parent-indicator::before { content: "" !important; }
.group-parent-indicator {
  position: absolute !important;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  margin: 0 !important;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D0D0D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 24px no-repeat;
  transition: transform .2s ease;
}
.group-parent-indicator[aria-expanded="true"] { transform: translateY(-50%) rotate(180deg); }
.group-parent-indicator:focus-visible { outline: 2px solid var(--dm-info); outline-offset: 2px; border-radius: 4px; }

/* ===== PAST INCIDENTS ===== */
.incidents-list { margin-top: 40px; }
#past-incidents { margin: 0 !important; padding: 6px 0; }

/* En-tête : titre à gauche, toggle à droite (injecté par le script du footer) */
.dm-incidents-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--dm-border);
}

/* Toggle "Only show incidents" */
.dm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: var(--dm-text-alt);
  user-select: none;
}
.dm-toggle input {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0);
}
.dm-toggle__track {
  position: relative;
  flex: none;
  width: 48px; height: 24px;
  border-radius: 24px;
  background: var(--dm-toggle-off);
  transition: background .2s ease;
}
.dm-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #FFFFFF no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.dm-toggle input:checked + .dm-toggle__track { background: var(--dm-toggle-on); }
.dm-toggle input:checked + .dm-toggle__track::after {
  transform: translateX(24px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D0D0D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}
.dm-toggle input:focus-visible + .dm-toggle__track { outline: 2px solid var(--dm-info); outline-offset: 2px; }

/* Masquage des jours sans incident quand le toggle est actif */
/* Toggle ON : l'historique des 3 derniers mois remplace les 15 jours natifs */
.dm-history { display: none; }
.incidents-list.dm-history-on .dm-history { display: block; }
.incidents-list.dm-history-on .dm-native { display: none !important; }
.dm-history-status:empty { display: none; }
.dm-history-status,
.dm-history-empty {
  margin: 0;
  padding: 16px 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--dm-text);
  border-bottom: 1px solid var(--dm-border);
}

/* Jours */
.status-day {
  margin: 0 !important;
  padding: 16px 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--dm-border) !important;
}
.status-day .date,
.incidents-list .status-day .date {
  font-family: var(--dm-font-title) !important;
  font-size: 16px !important;
  line-height: 20px !important;
  font-weight: 500 !important;
  color: var(--dm-text) !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 0 4px !important;
}
.status-day.no-incidents p,
.status-day .no-incidents-message {
  margin: 0 !important;
  font-size: 16px;
  line-height: 24px;
  color: var(--dm-text) !important;
  visibility: visible !important;
}

/* Incident */
.incident-container { position: relative; margin: 0 0 16px !important; padding: 0 !important; }
.incident-container:last-child { margin-bottom: 0 !important; }
.incident-title {
  position: relative;
  margin: 0 0 4px !important;
  font-family: var(--dm-font-incident) !important;
  font-size: 20px !important;
  line-height: 28px !important;
  font-weight: 700 !important;
}
.incident-title a { color: var(--dm-text) !important; font-family: inherit !important; }
.incident-title::before {   /* point 12px en débord à gauche */
  content: "";
  position: absolute;
  left: -20px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--dm-success);
}
.incident-title.impact-minor::before { background: var(--dm-warning); }
.incident-title.impact-major::before,
.incident-title.impact-critical::before { background: var(--dm-error); }
.incident-title.impact-maintenance::before { background: var(--dm-info); }

/* Timeline des mises à jour */
.updates-container { position: relative; padding: 4px 0 !important; margin: 0 !important; }
.updates-container::before {
  content: "";
  position: absolute;
  left: -14.5px; top: 16px; bottom: 16px;
  width: 1px;
  background: var(--dm-line);
}
.update {
  position: relative;
  margin: 0 0 16px !important;
  padding: 0 !important;
  font-size: 0;                    /* neutralise le " - " brut de Statuspage */
}
.update:last-child { margin-bottom: 0 !important; }
.update::before {                  /* petit point 4px sur la timeline */
  content: "";
  position: absolute;
  left: -16px; top: 10px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--dm-line);
}
.update br { display: none; }
.update strong { margin-bottom: 2px; }
.update .whitespace-pre-wrap {
  display: block;
  font-size: 16px;
  line-height: 24px;
  color: var(--dm-text);
}
.update small {
  display: block;
  font-family: var(--dm-font-mono) !important;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .12px;
  color: var(--dm-text-muted);
}
.update small var { font-style: normal; }

/* Couleurs des statuts d'incident : une couleur par étape
   Investigating (rouge) → Identified (jaune) → Monitoring (violet) → Resolved (vert)
   Update / Postmortem / maintenance : violet (information) */
.update strong.dm-badge--resolved,
.update strong.dm-badge--completed { background: var(--dm-success-bg); }
.update strong.dm-badge--identified { background: var(--dm-warning-bg); }
.update strong.dm-badge--identified::before { background: var(--dm-warning); }
.update strong.dm-badge--monitoring,
.update strong.dm-badge--update,
.update strong.dm-badge--postmortem,
.update strong.dm-badge--scheduled,
.update strong.dm-badge--in-progress,
.update strong.dm-badge--verifying { background: var(--dm-info-bg); }
.update strong.dm-badge--monitoring::before,
.update strong.dm-badge--update::before,
.update strong.dm-badge--postmortem::before,
.update strong.dm-badge--scheduled::before,
.update strong.dm-badge--in-progress::before,
.update strong.dm-badge--verifying::before { background: var(--dm-info); }
.update strong.dm-badge--investigating { background: var(--dm-investigating-bg); }
.update strong.dm-badge--investigating::before { background: var(--dm-investigating); }

/* =====================================================================
   MOBILE (Figma 360px)
   ===================================================================== */
@media (max-width: 600px) {
  /* Header 64px */
  .masthead { height: 64px; }
  .masthead .logo-container img { width: 126px !important; height: 58px !important; }
  #show-updates-dropdown,
  a.show-updates-dropdown { height: 32px; padding: 0 12px !important; }

  .page-status { margin: 24px 0 !important; }
  .incidents-list { margin-top: 24px; }

  /* H2 mobile : 24/32 */
  .components-section .components-container::before,
  #past-incidents {
    font-size: 24px !important;
    line-height: 32px !important;
  }
  .components-section .components-container::before { padding: 8px 0; }
  #past-incidents { padding: 8px 0; }

  /* Composants : nom flexible, badge poussé à droite */
  .component-inner-container { padding-right: 24px !important; gap: 8px; }
  .component-inner-container .name { flex: 1 1 auto; }

  /* Sous-composants : pas de retrait, badge collé au bord droit */
  .child-components-container .component-inner-container { padding: 10px 0 !important; }
  .child-components-container .name { padding-left: 0; }

  /* Titre + toggle empilés */
  .dm-incidents-header { flex-direction: column; align-items: flex-start; }

  /* Incidents : pas de timeline, statut en gras + point 12px coloré */
  .incident-title::before { display: none; }
  .updates-container { padding: 0 20px !important; }
  .updates-container::before { display: none; }
  .update::before {
    left: -18.5px; top: 6px;
    width: 12px; height: 12px;
    background: var(--dm-success);
  }
  .update:has(.dm-badge--identified)::before { background: var(--dm-warning); }
  .update:has(.dm-badge--monitoring)::before,
  .update:has(.dm-badge--update)::before,
  .update:has(.dm-badge--postmortem)::before { background: var(--dm-info); }
  .update:has(.dm-badge--investigating)::before { background: var(--dm-error); }
  .update strong.dm-badge {
    display: block !important;
    padding: 0;
    margin: 0;
    background: none !important;
    font-size: 16px !important;
    line-height: 24px !important;
    color: var(--dm-text) !important;
  }
  .update strong.dm-badge::before { display: none; }
}