/* =========================
   FDV – @6tex
   ========================= */

@font-face {
  font-family: 'DMSerifDisplay-Regular';
  src: url('polices/DM_Serif_Display/DMSerifDisplay-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Lato-Regular';
  src: url('polices/Lato/Lato-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url('polices/Material-Icons/MaterialIcons-Regular.ttf') format('truetype');
}



:root {
  /* font */
  --font: "Lato-Regular", sans-serif;
  --font_title: "DMSerifDisplay-Regular", serif;
  /* main */
  --bg: #fef6f0;
  --color_title: #002960;
  --color_text: #002960;
  /* color */
  --orange: #ffa01c;
  --beige: #ffd7b5;
  /* cadre*/
  --white: #fffaf6;
  --blue: #344a79;
}

/* Reset léger */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color_text);
  background-color: var(--bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* =========================
   Typographie
   ========================= */
h1,
h2,
h3 {
  font-family: var(--font_title);
  color: var(--color_text);
}

h1 {
  font-size: clamp(2rem, 2.5rem, 3rem);
  line-height: 3;
}

h2 {
  font-size: clamp(1.5rem, 2rem, 2.5rem);
  line-height: 2;
}

h3 {
  font-size: clamp(1rem, 1.5rem, 2rem);
  line-height: 1;
}

p {
  font-size: clamp(0.9rem, 1.3rem, 1.7rem);
}

.italic {
  font-style: italic;
}

.bold {
  font-weight: bold;
}

.bolder {
  font-weight: bold;
}

.error {
  color: red;
}

.spip_documents {
  padding: 1em;
}

.spip_documents_left {
  float: left;
  padding: 1em 2em 1em 0;
}

.spip_documents_right {
  float: right;
  padding: 1em 0 1em 2em;
}

.spip_documents_center {
  text-align: center;
}

.responsive {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5%;
}

.responsive img {
  height: 150px;
  width: auto;
}

@media (min-width: 768px) {

  .responsive .spip_documents_left,
  .responsive .spip_documents_right {
    padding: 1em;
  }
}

@media (max-width: 768px) {
  .responsive {
    flex-direction: column;
  }

  .responsive img {
    height: 100px;
    width: auto;
  }
}

/* Sur grand écran, aligner image et légende verticalement */
@media (min-width: 768px) {
  .spip_doc_inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
  }
}

/* Sur petit écran, afficher image et légende en ligne */
@media (max-width: 768px) {
  .spip_doc_inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30%;
    font-size: large;
  }

  /* Légende à gauche pour le 1er, 3ème, 5ème, etc. */
  .spip_document:nth-child(odd) .spip_doc_legende {
    order: -1;
    /* Met la légende avant l'image */
  }

  /* Légende à droite pour le 2ème, 4ème, 6ème, etc. */
  .spip_document:nth-child(even) .spip_doc_legende {
    order: 1;
    /* La légende après l'image */
  }
}

.spip_doc_legende {
  text-align: center;
}



/* =========================
   Boutons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(11, 43, 76, .35);
  background-color: var(--white);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(11, 43, 76, .10);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 43, 76, .55);
}

.btn--primary {
  background: var(--primary);
  border-color: rgba(11, 43, 76, .45);
}

.btn--primary:hover {
  background: var(--primary-2);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(11, 43, 76, .35);
  box-shadow: none;
}

.btn--block {
  width: 100%;
}

/* =========================
   Cartes & sections
   ========================= */
.section {
  padding: 28px 0;
}

.card {
  background: rgba(255, 255, 255, .65);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card--tight {
  padding: 14px;
}

.card--flat {
  box-shadow: none;
  background: rgba(255, 255, 255, .55);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .65);
  border: 1px solid var(--line);
}


/* =========================
   Nav (burger)
   ========================= */

#menu .fixed-menu .logo img {
  width: 100%;
}

#menu .burger {
  width: 30px;
  height: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: fixed;
  top: 30px;
  right: 5%;
}

@media (max-width: 768px) {
  #menu .burger {
    top: 1em;
    right: 1em;
  }
}

#menu .burger .line {
  height: 5px;
  background-color: var(--color_title);
  width: 100%;
}

#animated-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: auto;
  min-width: 440px;
  background-color: var(--white);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.6s ease;
  height: auto;
  overflow-y: auto;
  border-color: var(--white);
  border-left: 2px solid;
  border-bottom: 2px solid;

}

#animated-menu.open {
  transform: translateX(0);
}


#animated-menu .menu,
#animated-menu .menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#animated-menu .menu li {
  text-align: left;
  padding-left: 1em;
}

#animated-menu .menu li a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 3%;
  gap: 2%;
  font-size: large;
  text-decoration: none;
  color: inherit;
}

#animated-menu .menu-nested {
  display: none;
  padding-left: 2em;
}

#animated-menu .menu-nested li {
  padding-left: 2em;
}

#animated-menu .menu-nested li a {
  padding-left: 2em;
}

/* Style pour l'icône de triangle */
#animated-menu .menu-toggle {
  margin-left: auto;
  /* Aligne l'icône à droite */
  cursor: pointer;
  font-size: 0.7em;
  user-select: none;
  /* Empêche la sélection du texte */
}

#animated-menu a.on .title {
  color: var(--orange);
}



/* =========================
   Content)
   ========================= */

#content {}

#content .title {
  display: flex;
  align-items: center;
  gap: 3%;
}

#content .title,
#content .texte {
  padding: 1.5em;
}


#content .rubrique-content {
}

#content .rubrique-content .ariane {
  font-size: smaller;
  padding: 1em;
  font-style: italic;
}

.rubrique-articles div {
  background-repeat: no-repeat;
  background-position: right;
}


/* =========================
   Grilles (2 “portes d’entrée”, etc.)
   ========================= */
.grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 760px) {
  .grid--2 {
    grid-template-columns: 1fr 1fr;
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid rgba(246, 161, 42, .35);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.feature__title {
  font-weight: 800;
  margin: 0 0 4px;
}

.feature__text {
  margin: 0;
  opacity: .95;
}

/* =========================
   Bottom
   ========================= */
.bottom-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(8, 54, 95, .92);
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

.bottom-cta__inner {
  width: min(100% - 24px, var(--container));
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.bottom-cta .btn {
  flex: 1 1 auto;
  border-color: rgba(255, 255, 255, .18);
}

.bottom-cta__icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  color: #fff;
}

@media (min-width: 900px) {
  .bottom-cta {
    display: none;
  }
}

/* Pour éviter que la barre fixe cache le bas de page */
.has-bottom-cta {
  padding-bottom: 86px;
}

/* =========================
   Footer
   ========================= */
footer {
  background: var(--color_title);
  color: var(--white);
  padding: 15px 0;
  font-family: Arial, sans-serif;
  font-size: x-small;
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-direction: row;
  list-style: none;
  margin: 0;
  padding: 0;
}

footer ul li {
  position: relative;
  padding: 5px 10px;
}

footer ul li>a {
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}

footer ul li>a:hover {
  color: var(--orange);
}

footer ul li ul.footer-menu-nested {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #5a5a5a;
  min-width: 200px;
  padding: 10px 0;
  border-radius: 0 0 5px 5px;
  z-index: 1000;
  flex-direction: column;
  gap: 0;
}

footer ul li:hover ul.footer-menu-nested {
  display: flex;
}

footer ul li ul.footer-menu-nested li {
  padding: 5px 20px;
  width: 100%;
}

footer ul li ul.footer-menu-nested li a {
  color: var(--white);
  text-decoration: none;
  display: block;
  padding: 5px 10px;
}

footer ul li ul.footer-menu-nested li a:hover {
  color: var(--orange);
}

/* =========================
   Admin
   ========================= */
.material-icons {
  display: inline-block;
  font-family: 'Material Icons';
  font-size: inherit;
  width: 1em;
}

#spip-admin {
  position: unset;
  display: flex;
  flex-direction: column;
}