/* =======================================
   Variables & thèmes
======================================= */
:root {
  --bg: #ffffff;
  --border: #DADBE0;
  --bg-muted: #f6f7fb;
  --txt: #00008c;
  --txt-muted: #c7d0db;
  --brand: #0000FF;
  --secondary: #666D92;
  --redbox: #D00000;
  --border: #e5e7eb;
  --radius: 16px;
  --gap: 16px;
  --shadow: 0 6px 24px rgba(17, 24, 39, 0.08);
  --modal-bg: var(--bg);
  --modal-txt: var(--txt);
  --img-dark-filter: invert(1) hue-rotate(180deg);  
}

.portail {
  --bg: #f7f8fc;              /* fond principal */
  --bg-muted: #ffffff;        /* surface cartes */
  --txt: #1f2430;             /* texte principal */
  --txt-muted: #677086;       /* texte secondaire */
  --brand: #2f5aff;           /* bleu marque */
  --secondary: #b0b0b0;       /* éléments secondaires (icônes, chips) */
  --border: #e4e7ee;          /* séparateurs / bordures */
  --shadow: 0 6px 24px rgba(17, 24, 39, 0.06); /* ombre douce */
}

.dark-portail {
  --bg: #0d1020;              /* fond principal */
  --bg-muted: #14182b;        /* surface cartes */
  --txt: #d7dcef;             /* texte principal */
  --txt-muted: #9aa3bd;       /* texte secondaire */
  --brand: #6ea0ff;           /* bleu marque */
  --secondary: #7a7a7a;       /* éléments secondaires (icônes, chips) */
  --border: #222a45;          /* séparateurs / bordures */
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.6); /* ombre forte */
}

.dark {
  --bg: #181a1b;
  --bg-muted: #23272a;
  --txt: #e4e6eb;
  --txt-muted: #b0b3b8;
  --brand: #339af0;
  --secondary: #8a8d91;
  --border: #343a40;
  --shadow: 0 6px 24px rgba(0,0,0,0.7);
  --img-dark-filter: invert(1) hue-rotate(180deg);    
}

.dark-blue {
  --bg: #0a192f;
  --bg-muted: #112240;
  --txt: #ccd6f6;
  --txt-muted: #8892b0;
  --brand: #64ffda;
  --secondary: #8892b0;
  --border: #233554;
  --shadow: 0 6px 24px rgba(0,0,0,0.7);
}

.dark-green {
  --bg: #1b2b1b;
  --bg-muted: #223322;
  --txt: #d7ffd9;
  --txt-muted: #a3c9a8;
  --brand: #4caf50;
  --secondary: #a3c9a8;
  --border: #2e4d2e;
  --shadow: 0 6px 24px rgba(0,0,0,0.7);
}

.dark-high-contrast {
  --bg: #000000;
  --bg-muted: #1a1a1a;
  --txt: #ffffff;
  --txt-muted: #cccccc;
  --brand: #ffcc00;
  --secondary: #cccccc;
  --border: #333333;
  --shadow: 0 6px 24px rgba(0,0,0,0.9);
  --img-dark-filter: invert(1) hue-rotate(180deg);    
}

/* =======================================
   Font-face
======================================= */
@font-face {
  font-family: 'Roboto-medium';
  src: url('/static/webchecker/font/roboto-medium-webfont.woff2') format('woff2'),
       url('/static/webchecker/font/roboto-medium-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto-light';
  src: url('/static/webchecker/font/roboto-light-webfont.ttf') format('ttf'),
       url('/static/webchecker/font/roboto-light-webfont.woff') format('woff'),
       url('/static/webchecker/font/roboto-light-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat-regular';
  src: url('/static/webchecker/font/Montserrat-Regular.otf');
}

@font-face {
  font-family: 'Montserrat-Bold';
  src: url('/static/webchecker/font/Montserrat-Bold.otf');
}

@font-face {
  font-family: 'Barlow-regular';
  src: url('/static/webchecker/font/Barlow-Regular.ttf');
}

/* =======================================
   Réglages globaux
======================================= */
html, body {
  height: 100%;
  background-color: var(--bg);
}

a { color: var(--brand); }

body, td {
  font-family: 'Barlow-regular';
  font-weight: 400;
  font-size: 14px;
  line-height: 145%;
  margin: 0;
  background-color: var(--bg);
}


div, select, .file-name { color: var(--txt); }

h1 {
  font-family: 'Montserrat-regular';
  color: var(--secondary);
  font-weight: bold;
  font-size: 24px;
  line-height: 1.4;
}

h2 {
  font-family: 'Montserrat-regular'
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1.4;
}

h3 {
  font-family: 'Barlow-regular';  
  color: var(--secondary);
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1.2;
}

h4 {
  font-weight: 700;
}

.sup { /* exposant */
  font-size: 0.7em;
  vertical-align: super;
}

.iconized {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: inline-block;
}

th, .subtitle {
  font-family: 'Barlow-regular';
  color: var(--brand);
  font-weight: 500;
  font-size: 16px;
  line-height: 125%;
}

.docatitle {
  font-family: 'Montserrat-regular';
  color: var(--brand);
  font-weight: 600;
  font-size: 16px;
  line-height: 125%;
}

.header-image {
  background-image: url('/static/webchecker/img/cobalt-background.svg');
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

.special { color: darkblue; }

.restricted { color: #303846; }





/* =======================================
   Layout & wrappers
======================================= */
.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
}

.page-header, .page-footer {
  flex-grow: 0;
  flex-shrink: 0;
  background-color: var(--bg);
}

.page-body { flex: 1; background-color: var(--bg); }

.bottom_container { position: relative; }
.bottom_container_position { position: absolute; bottom: 0; }

.header-image { background-color: var(--bg); }

/* =======================================
   Cards & blocs
======================================= */
.docabloc,
.docacard {
  background-color: var(--bg);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin: 10px;
}

.docabloc { padding: 14px; }
.docacard { padding: 20px; }

.callout {
  background: var(--bg-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--txt-muted);
}

/* =======================================
   Tableaux
======================================= */
table {
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}

table th,
table td {
  padding: 10px 15px;
  border-bottom: 1px solid #e6e6f0;
}

table th { color: var(--brand); font-weight: bold; }

table td { color: var(--txt);background-color:rgba(0,0,0,0.03); /* overlay semi-transparent */ }

table tr:last-child td { border-bottom: none; }

table tr:hover {
  background-color: var(--bg-muted);
  cursor: default;
}

/* =======================================
   Formulaires
======================================= */
input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 30px 5px 12px;
  font-size: 14px;
  color: var(--txt);
  background-color: var(--bg);
  transition: all 0.3s ease;
  outline: none;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}



select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 30px 5px 12px;
  font-size: 14px;
  background-color: var(--bg);
  color: var(--txt);
  outline: none;
  transition: all 0.3s ease;
}

.input-center { width: 100%; max-width: 30%; }

/* =======================================
   Boutons
======================================= */
button {
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 25px;
  background-color: var(--brand);
  border: 1px solid var(--brand);
  color: var(--bg);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

submit {
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 25px;
  background-color: var(--brand);
  border: 1px solid var(--brand);
  color: var(--bg);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

button:hover {
  background-color: var(--txt);
  color: var(--bg);
}


button.filled:hover { background-color: var(--bg); }


.small { padding: 5px 15px 5px 12px; font-size: 14px; }

/* =======================================
   Utilitaires
======================================= */
.center { text-align: center; vertical-align: middle; }
.center-flex { display: flex; align-items: center; justify-content: center; }
.pd-1 { padding: 1em; }
.width-10 { width: 10%; }
.width-13 { width: 13%; }
.round-shape { background-color: #fef8d1; color: darkblue; border-radius: 25px; padding: 10px 20px; text-align: center; display: inline-block; font-weight: bold; }
.link-box { word-wrap: anywhere; }
.link-box:hover { text-decoration: underline; }
.has-discs { list-style-type: disc; padding-left: 1.5em; }

/* =======================================
   Grille de tuiles
======================================= */
.tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
  align-items: stretch;
}

.tuile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  color: var(--txt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tuile:hover { transform: translateY(-2px); }
/*
.tuile:focus-within { outline: 3px solid color-mix(in oklab, var(--brand) 35%, transparent); outline-offset: 2px; }
*/

.tuile__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tuile__title { font-weight: 700; letter-spacing: .2px; }
.tuile__subtitle { color: var(--txt); font-size: .95rem; line-height: 1.35;align-items: center;  }
.tuile__body { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

.tuile--wide { grid-column: span 2; }
.tuile--tall { grid-row: span 2; }

@media (max-width: 900px) {
  .tuile--wide { grid-column: auto; }
  .tuile--tall { grid-row: auto; }
}

/* =======================================
   PDF container
======================================= */
.pdf-container { width: 100%; height: 700px; margin-top: 20px; }
.pdf-container object { width: 100%; height: 100%; }

/* =======================================
   Collapsible
======================================= */
.collapsible { cursor: pointer;}
.collapsible:after { content: '   +';}
.collapsible:hover, .active { background-color: #ccc; }
.active:after { content: '  -'; }

.collapsing-content {
  padding: 0 18px;
  background-color: var(--bg);
  max-height: 0;
  overflow: hidden;
  transition: max-height .2s ease-out;
}

/* =======================================
   Slider
======================================= */
.slider { position: relative; overflow: hidden; width: 100%; height: 100%; flex: 1; }
.slides { display: flex; transition: transform .5s ease; width: 100%; position: relative; }
.slide { min-width: 100%; height: 100%; background-size: cover; background-position: center; }
.small-slide { width: 80%; height: 100%; background-size: cover; background-position: center; margin: auto; }

.buttons-container { display: flex; flex-direction: column; justify-content: center; margin-left: 1rem; margin-block: 1rem; }
.button-arrow { position: absolute; top: 50%; transform: translateY(-50%); border: none; padding: 10px; background: unset; }
.left { left: 20px; }
.right { right: 20px; }

.indicators { 
  display: flex; 
  justify-content: center; 
  margin-top: 10px; 
}
.indicator { 
  height: 10px; 
  width: 10px; 
  margin: 0 5px; 
  border-radius: 50%; 
  background-color: var(--brand);
  cursor: pointer;
 }
.indicator.active { 
  background-color: var(--text);
 }

.item-right { text-align: right; margin-right: 25px; margin-bottom: 20px; }

/* =======================================
   Switch (toggle)
======================================= */
.switch { 
  position: relative; 
  display: inline-block; 
  width: 40px; 
  height: 20px; 
}
.switch input { 
  opacity: 0; 
  width: 0; 
  height: 0; 
}

.switch-slider { 
  position: absolute; 
  cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; 
  background-color: var(--txt-muted); 
  transition: .4s; 
  border-radius: 34px; 
}

.switch-slider:before { 
  position: absolute; 
  content: ''; 
  height: 16px; 
  width: 16px; 
  left: 2px; 
  bottom: 2px; 
  background-color: var(--bg); 
  transition: .4s; 
  border-radius: 50%; 
  }

input:checked + .switch-slider { 
  background-color: var(--txt); 
}

input:checked + .switch-slider:before {
   transform: translateX(20px); }

.sr-only { position: absolute; 
  width: 1px; 
  height: 1px; margin: -1px; padding: 0; overflow: hidden; 
  clip: rect(0,0,0,0); border: 0; }

/* =======================================
   En-tête / Navigation
======================================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 30px;
  background-color: var(--bg);
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  flex-wrap: wrap;
}

.selfcare-prelogo { 
  font-family: 'Montserrat-bold'; 
  color: var(--secondary);
  font-weight: bold;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
  line-height: 49px;  
}

.selfcare-logo { 
  font-size: 32px; 
  font-family: 'Montserrat-bold'; 
  color: var(--brand); 
  font-weight: 600;
  line-height: 49px;  
}

.selfcare-logo, .selfcare-logo a { 
  text-decoration: none !important; 
}

.logo .sub { 
  font-weight: normal; 
}

.selfcare-menu { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; }
.selfcare-menu-item { 
  position: relative; 
  display: flex;
  flex-direction: column; 
  align-items: center; 
  text-align: center;
  }

.selfcare-menu-item a { text-decoration: none; color: var(--brand); font-size: .9rem; font-weight: 500; }
.selfcare-menu-item i { display: block; margin: 0 auto 5px; text-align: center; }

.selfcare-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.selfcare-dropdown-menu {
  text-align: left; 
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg);
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 10px 0;
  min-width: 180px;
  z-index: 1000;
}

.selfcare-dropdown-menu li { position: relative; padding: 5px 15px; list-style: none; white-space: nowrap; }
.selfcare-dropdown-menu a { color: var(--brand); }

.selfcare-dropdown-submenu {
  text-align: left;
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background-color: var(--bg);
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 10px 0;
  min-width: 180px;
  z-index: 1000;
}

.selfcare-dropdown-subitem:hover > .selfcare-dropdown-submenu { 
  display: block; 
}
.selfcare-dropdown:hover .selfcare-dropdown-menu { 
  display: block;
 }

/* Hamburger */
.selfcare-hamburger { 
  display: none; 
  flex-direction: column; 
  justify-content: center;   /* centre verticalement les barres */
  align-items: center;       /* centre horizontalement */
  gap: 5px; 
  background: none; 
  border: none; 
  cursor: pointer;
  margin-top: 10px; 
  padding: 0;     
  }

.selfcare-hamburger span { 
  width: 30px; 
  height: 3px; 
  background-color: var(--brand); 
  border-radius: 2px;        /* arrondi pour un rendu plus net */  
}

@media (max-width: 1250px) {
  .navbar-selfcare { flex-direction: column; align-items: center; width: 100%; }
  .selfcare-menu { 
    flex-direction: column; 
    display: none; 
    width: 100%; 
    padding: 10px 0; 
    background-color: var(--bg); 
    align-items: center;   /* centre horizontalement */
    justify-content: center; /* garde l’ordre vertical */
  }
  .selfcare-menu.show {
     display: flex; 
    }
  .selfcare-actions { 
    margin-top: 10px; 
    display: none;
   }
  .selfcare-hamburger { 
    display: flex; 
  }

  .selfcare-menu {
    flex-direction: column;
    display: none;
    width: 100%;
    padding: 10px 0;
    background-color: var(--bg);

    align-items: center;   /* centre horizontalement */
    justify-content: flex-start; /* garde l’ordre vertical */
  }

  .selfcare-menu-item {   
    display: flex;
    align-items: center;   /* centre l’icône avec le texte */
    gap: 8px;              /* espace entre icône et texte */
    padding: 8px 16px;
    width: 100%;           /* clic sur toute la ligne */
    gap: 12px;              /* espace entre icône et texte */
    width: 48%; min-width: 160px; margin-bottom: 10px; 
  }
}

/* =======================================
   Modale
======================================= */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.50); /* overlay semi-transparent */
  padding: 24px;
  z-index: 1000;
}

.modal.is-open { display: flex; }

.modal__dialog {
  max-width: 1200px;
  width: 75%;
  margin: 0 auto;
  background: var(--bg);
  color: var(--txt);
  border-radius: 18px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateY(8px) scale(.98);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
  outline: none;
    max-height: 80vh;
    overflow-y: auto;
}

.is-open .modal__dialog { transform: translateY(0) scale(1); opacity: 1; }

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  appearance: none;
  border: none; 
  background: var(--bg);
  color: var(--txt);  
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal__close:focus { 
  outline: 2px solid #2f3cff;
  outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .modal__dialog { transition: none; transform: none; opacity: 1; }
}

/* =======================================
   Pied de page
======================================= */
.page-footer {
  background: var(--bg);
  color: var(--txt-muted);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  font-size: .9rem;
}

.page-footer a { 
  color: var(--txt); 
  text-decoration: none;
}
.page-footer a:hover { text-decoration: underline; }

.page-footer__inner { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 var(--gap);
}

.page-footer__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--gap);
}

.page-footer__left {
    flex: 1;
    min-width: 0;
}

.page-footer__right {
    text-align: right;
    flex-shrink: 0;
}

.page-footer__links { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px 18px; 
}

.page-footer__notice { 
    margin-top: 6px; 
    font-size: .85rem; 
    line-height: 1.4; 
    opacity: .85; 
    max-width: 600px;
}

.page-footer__copy { 
    font-size: .85rem; 
    opacity: .8;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-footer__copy p {
    margin: 0;
    text-align: center;
}

.page-footer__copy img {
    margin: 4px 0;
}

@media (max-width: 768px) {
    .page-footer__content {
        flex-direction: column;
    }
    
    .page-footer__right {
        text-align: center;
        margin-top: var(--gap);
    }
}

@media (max-width: 720px) {
  .page-footer__inner { grid-template-columns: 1fr; }
  .page-footer__brand { justify-self: start; }
}

/* =======================================
   Icônes
======================================= */
.icon { display: inline-block; vertical-align: middle; inline-size: var(--ic); block-size: var(--ic); }
.icon > img, .icon > svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.icon-16 { --ic: 16px; }
.icon-24 { --ic: 24px; }
.icon-big { --ic: 36px; }
.icon > img { image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; }
.icon-logo {
  height: 70%;      /* s'adapte à la largeur du composant parent */
  max-width: 400px; /* limite la taille maximale (ancienne valeur conservée) */
  width: auto;     /* conserve le ratio */
  object-fit: contain;
}
.icon-header {
  height: 70%;      /* s'adapte à la largeur du composant parent */
  max-width: 300px; /* limite la taille maximale (ancienne valeur conservée) */
  width: auto;     /* conserve le ratio */
  object-fit: contain;
}
/* =======================================
   Divers
======================================= */
.header-image { background-color: var(--bg); }
.item-right { text-align: right; margin-right: 25px; margin-bottom: 20px; }
.centered { text-align: center; }
.vcentered {vertical-align: middle; }

.filled {
  background-color: var(--bg);
  color: var(--bg);
  border-color: var(--bg);
}


.outlined {
  background-color: transparent;
  border: 1px solid var(--brand);
  color: var(--txt);
}

.transparent {
  background: transparent;
  border: 0;
  box-shadow: none;
}


/* =======================================
   Classes couleur (messages/états)
======================================= */
.green_text { color: #4A801A; }
.green_icon { color: #289D15; }

.orange_text { color: #D92C01; }
.orange_icon { color: #ED6508; }

.red_text { color: #D00000; }
.red_icon { color: #D82A2A; }

.success {
  color: #4A801A;
  border: 2px solid #4A801A;
}

.warning { color: #D92C01; }

.error {
  color: #D00000;
  border: 2px solid #D00000;
}

.badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  font-size: 0.95em;
  font-weight: 600;
  border-radius: 1em;
  background: var(--txt-muted);
  color: var(--txt);
  vertical-align: middle;
  margin-right: 0.3em;
}

.badge.possible {
  background: var(--brand);
  color: var(--bg);
}

.badge.neutral {
  background: #e0e0e0;
  color: #333;
}

.badge.outlined {
  background: transparent;
  border: 1px solid #bbb;
}

.badge.error {
  background: var(--txt-bg);
  color: var(--txt-muted);
}


.badge.redbox {
  color: var(--bg);
  background: var(--redbox);
}


.impossible {
  color: var(--txt-muted);
  border-color: var(--txt-muted);
  background-color: var(--txt-bg);
}

.neutral {
  color: var(--txt);
  border-color: var(--txt-muted);
  background-color: var(--bg);
}

.possible {
  color: var(--bg);
  border-color: var(--bg);
  background-color: var(--txt);
}


.dark-portail .invert-on-dark,
.dark .invert-on-dark,
.dark-blue .invert-on-dark,
.dark-green .invert-on-dark,
.dark-high-contrast .invert-on-dark,
.dark [data-invert-on-dark] {
  filter: var(--img-dark-filter);
}

.dark-portail .bg-invert-on-dark,
.dark .bg-invert-on-dark,
.dark-blue .bg-invert-on-dark,
.dark-green .bg-invert-on-dark,
.dark-high-contrast .bg-invert-on-dark {
   filter: var(--img-dark-filter);
}

.ul-left {
list-style-type: none;text-align: left;
}