:root {
  --primary: #00427c;
  --primary-light: #0066b3;
  --grey: #f5f5f7;
  --text: #333;
  --blue-soft: #e6f0fa;
}


* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--grey);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
}

body.loading {
  opacity: 0;
  pointer-events: none;
}


main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 2rem;
}


footer {
  background: #1e1e1e;
  color: #ccc;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

#mentions-legales {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  background: transparent;
  color: #ccc;
  font-size: 0.85rem;
  padding: 0;
  margin-top: 1rem;
  text-align: left;
}

#mentions-legales.open {
  max-height: 600px;
  padding: 1rem 0;
}



a {
  color: var(--primary);
  text-decoration: none; 
  padding: 0.1em 0.2em;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

a:hover {
  background-color: rgba(0, 66, 124, 0.1); 
}

header {
  background-image: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  text-align: center;
  position: relative;
  padding: 2.5rem 0 1.8rem; 
}

header h1 {
  margin: 1.2rem 0 0.5rem;  
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;        
}

header p.subtitle {
  margin: 0;
  font-size: 1rem;
  opacity: .9;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .25));
}

/* === Bannière === */
.banner {
  display: flex;
  text-align: center;
}

.banner-item {
  flex: 1;
  background-size: cover;
  background-position: center 37%;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}


.banner-text {
  font-size: 2.5rem;
  color: white;
  text-align: center;
  line-height: 1.3;
  max-width: 80%;
  word-wrap: break-word;
  letter-spacing: 0.2em;
}




.sub-text {
  font-size: 1.2rem;
  font-weight: 400;
  margin-top: 0.3rem;
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.7),
    1px 1px 5px rgba(0, 0, 0, 0.8);
}


nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: .75rem;
  margin: 0;
  flex-wrap: wrap;
}

nav li a {
  font-weight: 600;
  text-decoration: none;
}


section {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .05);
  text-align: justify; 
}

section p {
  line-height: 1.6;
}



section h2 {
  margin-top: 0;
  color: var(--primary);
}

footer a {
  color: #ccc;
  font-weight: 600;
  text-decoration: none;
}

footer a:hover {
  color: #fff; 
  background-color: transparent;
}

#password-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: center;
}

.password-input {
  flex: 1 1 250px;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.password-input:focus {
  border-color: var(--primary-light);
}

.password-button {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.password-button:hover {
  background-color: var(--primary-light);
}

.password-wrapper {
  position: relative;
  flex: 1 1 250px;
}

.password-input {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.toggle-password {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.toggle-password svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  transition: stroke 0.2s ease;
}

.toggle-password:hover svg {
  stroke: var(--primary-light);
  transform: scale(1.1);
}

sup a {
  text-decoration: none;
  color: #0077cc;
}


.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background-color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  display: flex;
  transition: opacity 0.3s ease, transform 0.2s ease;
}


.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.grid-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 960px;
  margin: auto;
  padding: 4rem 2rem;
  justify-items: stretch;
}

@media (max-width: 900px) {
  .grid-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-links {
    grid-template-columns: 1fr;
  }
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
  background-color: white;
  color: var(--primary);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.link-card:not(.link-card-primary):hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  background-color: #f9f9f9;
}

.link-card.link-card-primary {
  background-color: var(--primary-light); /* #0066b3 */
  color: white;
  transition:a background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card.link-card-primary:hover {
  background-color: var(--primary); /* #00427c */
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.subnav {
  background: #ffffff;
  padding: 1rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.subnav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.subnav li a {
  text-decoration: none;
  font-weight: 600;
  color: var(--primary);
  transition: color 0.2s ease;
}

.subnav li a:hover {
  color: var(--primary-light);
}

.footnote {
  font-size: 0.8em;
  color: #555;
  padding: 0 2rem 0 2.5rem; 
  text-align: left; 
}

p + ul {
    margin-top: -1rem;
}


.lot-list li::marker {
  color: var(--primary);
  font-size: 1.3em;
  margin-right: 0.5rem;
}

.result-box {
  background: #f9f9fc;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: center; 
}

.result-box p {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

.result-box a {
  word-break: break-word;
}

.result-note {
  font-size: 0.9rem;
  color: #555;
  margin-top: 1rem;
}

.start-button {
  display: inline-block;
  margin-top: 1rem;
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  padding: 1.5rem 2rem; 
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.start-button:hover {
  background-color: var(--primary-light);
}

.team-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
}

.team-block {
  flex: 1 1 320px;
  background-color: var(--blue-soft); 
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.team-block h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.logo-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.logo-row img {
  height: 50px;
  max-width: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.15));
}


.org {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.org-logo-wrap {
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.org-logo {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  display: block;
}


.org-info {
  flex: 1;
  text-align: left;
}

.org-name {
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: var(--primary);
}

.org-name span {
  font-weight: normal;
}

.flip-card {
  perspective: 1000px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}

.flip-back {
  transform: rotateY(180deg);
  gap: 0.5rem;
  flex-direction: row; 
 display: flex;
  align-items: center;
}

.icon-mail {
  display: flex;
  align-items: center;
  color: var(--primary); 
}

.icon-mail svg {
  display: inline-block;
  vertical-align: middle;
  width: 22px;
  height: 22px;
}

.no-bold {
  font-weight: normal !important;
}

.ethique-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
  max-width: 90vw; 
  margin: auto;
}


.ethique-main {
  flex: 1 1 45%;
  min-width: 20rem; 
}
.ethique-aside {
  flex: 1 1 15%;
  min-width: 18rem; 
  background: var(--blue-soft);
  border-radius: 12px;
  padding: 1rem 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}


.ethique-aside p {
  text-align: left;
}


.cnis-question {
  width: 45px;
  height: 45px;
  display: block;
  filter: brightness(0) saturate(100%) invert(13%) sepia(99%) saturate(4100%) hue-rotate(194deg) brightness(95%) contrast(95%);
}

.cnis-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  text-align: center;
}


.cnis-logo-wrap {
  background: white;
  border-radius: 50%;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  margin-bottom: 1rem;
}

.cnis-logo {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
}


.cnis-deco-circle {
  position: absolute;
  top: -15px;   
  left: -15px;  
  background: white;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

@media (max-width: 800px) {
  .ethique-main,
  .ethique-aside {
    flex: 1 1 100%;
  }

  .ethique-aside {
    margin-top: 0.5rem;
  }

  .ethique-grid {
    gap: 1rem; 
  }
}
