/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

:root{
  --primary-color: #223459;
  --secondary-color: #13B3F2;
  --color-red: #F20F38;
  --primary-font: "Montserrat", sans-serif;
  --secondary-font: "Oswald", sans-serif;
  --border-radius: 6px;
}

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
  font-family: var(--primary-font);
  font-optical-sizing: auto;
  font-style: normal;
}

*,
*:before,
*:after,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Default styles
   ========================================================================== */

.w-full {
  width: 100%;
}

.overflow-hidden {
  overflow: hidden;
}

.relative {
  position: relative;
}

.grid-container {
  display: grid;
}

.flex-container {
  display: flex;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-space-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

.position-fixed {
  position: fixed;
}

ul {
  margin-left: 15px;
}

li {
  margin-left: 15px;
}

h1,
h2 ,
h3  {
  margin: 15px 0;
}

.button {
  padding: 0 20px;
  height: 66px;
  min-width: 72px;
  text-decoration: none;
  line-height: 1;
  display: flex;
  border-radius: 2px;
  border: none;
  color: #222;
  cursor: pointer;
  width: max-content;
  transition: background .3s;
  white-space: nowrap;
  font-family: var(--secondary-font);
}

.background-primary {
  background-color: var(--primary-color);
}

.background-white {
  background-color: #fff;
}

.background-red {
  background-color: var(--color-red);
}

.color-primary {
  color: var(--primary-color);
}

.color-secondary {
  color: var(--secondary-color);
}

.color-white {
  color: #fff;
}

.button:not(.has-text-outside) {
  overflow: hidden
}

.button.bgcolor-white {
  color: #222;
}

.button.background-primary {
  color: #fff;
}

.button .button-icon {
  margin-left: 4px;
}

.button .button-icon svg {
  height: 16px;
  width: 16px;
}

.button.background-primary .button-icon svg {
  fill: #fff;
}

.button .icon-wrapper {
  display: flex;
  align-items: center
}

.button .icon-wrapper .initial-arrow {
  display: inline-block;
  transition: transform .3s ease-in-out,opacity .2s .1s;
}

.button .icon-wrapper .hover-arrow {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-30px);
  opacity: 0;
  transition: transform .3s ease-in-out,opacity .2s .1s;
}

.button.has-arrow:hover .hover-arrow {
  opacity: 1;
  transform: translate(0)
}

.button.has-arrow:hover .initial-arrow {
  opacity: 0;
  transform: translate(30px)
}

.button svg {
  color: rgb(var(--color-white));
  transition: color .3s
}

.button .text-inside .initial-text,
.menu a .text-inside .initial-text {
  display: inline-block;
  transition: transform .3s ease-in-out,opacity .2s .1s
}

.button .text-inside .hover-text,
.menu a .text-inside .hover-text  {
  transition: transform .3s ease-in-out,opacity .2s .1s;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateY(20px)
}

.button:hover .text-inside .initial-text,
.menu a:hover .text-inside .initial-text {
  transform: translateY(-20px);
  opacity: 0
}

.button:hover .text-inside .hover-text,
.menu a:hover .text-inside .hover-text {
  transform: translateY(0);
  opacity: 1
}

.button.has-arrow:hover .hover-arrow {
  opacity: 1;
  transform: translate(0)
}

.button.has-arrow:hover .initial-arrow {
  opacity: 0;
  transform: translate(30px)
}

.main-header {
  box-shadow: 0 0 0.1px #000;
}

.main-content-wrapper {
  background-color: #fff;
}

.container {
  max-width: 1240px;
  padding: 20px 10px;
  margin: auto;
}

/* .section-title {
  margin: 20px 0;
} */

.section-title h2 {
  font-size: 2rem;
  line-height: 1.2;
  padding: 0;
}

.section-picture img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  font-family: var(--secondary-font);
}

/*
 * Navbar
 */

header {
  background-color: #fff;
  padding: 10px 20px;
  box-shadow: 0 6px 12px rgba(0,0,0,.051);
  border-bottom: 1px solid rgba(0,0,0,.051);
}

.menu,
.submenu {
  margin: 0;
}

.brand-logo a {
  display: block;
  color: white;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
}

.brand-logo img {
  max-width: 100%;
  height: 60px;
}

#menu-toggle {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
}

.menu-bars {
  height: 24px;
  width: 24px;
  display: flex;
  cursor: pointer;
}

.menu-bar,
.menu-bar:before,
.menu-bar:after {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #222;
  transition-property: background, transform;
  transition-duration: 0.3s;
  transition-timing-function: ease;
  position: absolute;
}

.menu-bar {
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  transition: background-color 200ms ease-in-out;
}

.menu-bar:before,
.menu-bar:after {
  content: '';
}

.menu-bar:before {
  top: -6px;
  transition: top 200ms ease-in-out, transform 200ms ease-in-out 200ms;
}

.menu-bar:after {
  bottom: -6px;
  transition: bottom 200ms ease-in-out, transform 200ms ease-in-out 200ms;
}

#menu-toggle.visible .menu-bar {
 background-color: transparent;
}

#menu-toggle.visible .menu-bar:before {
 top: 0;
 transform: rotate(45deg);
}

#menu-toggle.visible .menu-bar:after {
 bottom: 0;
 transform: rotate(-45deg);
}

/* Style général du menu */
.menu {
  font-family: var(--secondary-font);
  list-style-type: none;
  display: none; /* Menu caché pour mobile */
  flex-direction: column;
  background-color: #fff;
  padding: 10px;
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow-y: auto;
  box-shadow: 0 6px 12px rgba(0,0,0,.051) inset;
}

/* Styles des items du menu */
.menu li {
  overflow: hidden;
  margin: 0;
}

.menu li:nth-child(-n+3) {
  border-bottom: 1px solid var(--primary-color);
}

.menu a {
  color: var(--primary-color);
  text-decoration: none;
  height: 60px; /* Hauteur uniforme pour tous les boutons */
  line-height: 60px; /* Centrer verticalement le texte */
  padding: 0 15px;
  transition: background .3s, color .2s .1s;
}

.menu a:hover,
.menu a:focus {
  color: #fff;
  background: var(--primary-color);
}

.menu a.background-red,
.menu a.background-red:hover,
.menu a.background-red:focus {
  color: #fff;
  background-color: var(--color-red);
}

/* Style de base pour le sous-menu */

.has-submenu .icon-wrapper {
  position: absolute;
  right: 15px;
}

.submenu {
  display: block; /* Ne pas cacher le sous-menu avec display */
  background-color: #F7F7F7;
  overflow: hidden; /* Cacher le contenu en excès pour l'animation */
  max-height: 0; /* Masquer le sous-menu initialement */
  transition: max-height 0.5s ease-in-out; /* Animation de détente/contraction */
}

.submenu li {
  border-bottom: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.submenu li a {
  color:  #222222;
}

.submenu a:hover,
.submenu a:focus {
  color: #fff;
  background: var(--secondary-color);
}

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

/*
 * Hero
 */
.home-slider {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.slider {
  position: relative;
  box-shadow: 0 2px 5px 0 rgba(0,0,0,.05);
  background-image: linear-gradient(#f5f5f5, #FFFFFF);
}

.slide {
  overflow: hidden;
  border-radius: var(--border-radius);
}

.slide img {
  width: 100%;
  height: auto;
}

.site-title,
.page-title {
  color: var(--primary-color);
}

.site-title h1 {
  font-size: 2.4rem;
  line-height: 1.2;
}

.hero .container,
.footer .container {
  gap: 20px;
}

.hero-media {
  border-radius: 6px;
  position: relative;

  overflow: hidden;

  width: 100%;
  padding-top: 56.25%;
}

.hero-media video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 100%;
}

.hero-content {
  padding: 20px 0;
}

.hero-headline {
  font-family: var(--secondary-font);
  margin-bottom: 20px;
}

.hero-headline h1,
.hero-headline h2 {
  line-height: 1;
}

.hero-headline h2 {
  font-size: 1.8rem;
  margin-bottom: 0;
  padding: 0;
}

.content-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  margin: 10px 0;
}

.hero .rich-text {
  display: block;
}

.hero .rich-text ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero .rich-text li {
  grid-template-columns: 16px auto;
  gap: 6px;
  align-items: start;
  line-height: 1.3;
  margin-bottom: 16px;
}

.section-cta {
  margin-top: 20px;
}

.hero-cta {
  gap: 14px;
}

.hero-cta .button {
  width: 100%;
}

/*
 * Engagement client
 */

.engagement {
  gap: 20px;
}

.engagement .section-title {
  margin: 0;
}

.engagement-headline {
  grid-template-columns: 100px auto;
  gap: 15px;
  align-items: center;
}

.engagement-header .engagement-headline {
  gap: 20px;
}

.engagement-picture img {
  max-width: 100%;
  height: auto;
}

.engagement-picture svg {
  fill: var(--primary-color);
}

.engagement-rich-text h2,
.aboutus h2 {
  margin: 10px 0;
}

.engagement:nth-child(n+2) {
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  padding: 16px 0;
}

.engagement:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.engagement:nth-child(n+2) .engagement-headline {
  grid-template-columns: 60px auto;
}

.engagement:nth-child(n+2) .engagement-picture {
  width: 60px;
  height: 60px;
  border: 4px solid #d3d6de;
  border-radius: 100%;
  padding: 10px;
  background-color: #fff;
}

.engagement-title {
  font-size: 1.2rem;
  line-height: 1.3;
}

/*
 * About us
 */

.aboutus-rich-text li:nth-child(n+2)  {
  margin-top: 10px;
}

/*
 * Footer
 */

.footer .section-title {
  margin-top: 0;
}

.bottom-bar  {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.footer .brand {
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.footer .section-title h2,
.footer .section-title h3  {
  margin: 0 0 10px 0;
  padding: 0;
}

.brand-slogan {
  margin: 0 0 15px 0;
  font-style: italic;
  font-size: 1.2rem;
  font-family: var(--secondary-font);
}

.footer-nav {
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 6px;
}

.footer-nav a,
.webdev a,
.socials a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: inline-flex;
  line-height: 1.6;
  transition: color .2s;
}

.footer-nav a:hover,
.footer-nav a:focus,
.webdev a:hover,
.webdev a:focus,
.socials a:hover,
.socials a:focus {
  color: rgba(255, 255, 255, 1);
}

.socials ul {
  gap: 15px;
  list-style: none;
}

.socials svg {
  height: 21px;
  width: 21px;
}

.legals {
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
}

.copyrights {
  margin-bottom: 10px;
}

.footer-nav a:after,
.webdev a:after {
  content: '';
  height: 1px;
  width: 100%;
  background-color: #fff;
  position: absolute;
  bottom: 0;
  margin-top: 4px;
  opacity: 0;
  transition: opacity .2s;
}

.footer-nav a:hover:after,
.footer-nav a:focus:after,
.webdev a:hover:after,
.webdev a:focus:after {
  opacity: 1;
}

.webdev {
  font-family: var(--secondary-font);
  text-align: right;
}

/*
 * Inner page
 */

.page {
  min-height: calc(100vh - 500px);
  padding-bottom: 40px;
}

.page-footer {
  min-height: calc(100vh - 280px);
}

.page-rich-text h2,
.page-rich-text h3,
.page-rich-text h4,
.page-introduction h2 {
  color: var(--primary-color);
}

.page-title h1 {
  font-size: 2rem;
  line-height: 1.4;
  margin-top: 10px;
}

.page-media {
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 20px;
}

.page-media img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.page ul {
  margin: 15px;
}

.page li {
  margin-bottom: 8px;
}

.border-bottom {
  padding-bottom: 15px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}

.page a:not(.button) {
  text-decoration: none;
  color: var(--primary-color);
}

.page a:not(.button):hover,
.page a:not(.button):focus {
  text-decoration: underline;
  color: var(--secondary-color);
}

.contact-wrapper {
  gap: 20px;
}

form {
  max-width: 600px;
  background: white;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

input, textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

button[type="submit"] {
  width: 100%;
}

.error {
  color: red;
  font-size: 0.9em;
}

.success-message, .error-message {
  display: none;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
}

.catalogue-section {
  margin-top: 20px;
}

.download-list li a {
  display: inline-flex;
  gap: 10px;
}


/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 840px) {
  .menu {
    display: flex;
    flex-direction: row;
    width: auto;
    position: static;
    box-shadow: none;
    padding: 0;
    gap: 10px;
  }

  .menu li {
    border-radius: 2px;
  }
  
  .menu li:nth-child(-n+3) {
    border-bottom: none;
  }

  .has-submenu a {
    padding-right: 41px;
  }

  .submenu {
    position: absolute;
    top: 80px; /* Ajuste la position du sous-menu pour qu'il soit en dessous du bouton */
    left: auto;
    max-height: 0; /* Masquer le sous-menu par défaut */
    transition: max-height 0.2s ease-in-out; /* Animation fluide */
    z-index: 1000; /* S'assurer que le sous-menu reste au-dessus des autres éléments */
    width: 200px;
    border-radius: 2px;
    background-color: #fff;;
    box-shadow: 0 6px 12px rgba(0,0,0,.051);
  }

  .menu .submenu li {
    border-radius: 0;
  }

  .has-submenu:hover .submenu,
  .has-submenu:focus-within .submenu {
    max-height: 300px; /* Hauteur maximale quand le sous-menu est déployé */
    overflow: visible; /* Affiche correctement le contenu */
  }

  #menu-toggle {
    display: none;
  }

  .container {
    padding: 40px 20px;
  }

  .hero .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-media {
    order: 2;
  }

  .hero-content {
    padding: 0;
  }

  .hero-cta {
    grid-template-columns: repeat(2, 200px) auto;
    margin-top: 40px;
  }

  .hero-cta .button {
    max-width: 200px;
  }

  .hero-cta .button:first-child {
    order: 2;
  }

  .engagement-client .container {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 3fr auto;
    gap: 20px;
  }

  .engagement-header {
    grid-area: 1 / 1 / 2 / 4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 20px;
  }

  .engagement-client .engagement:nth-child(2) { 
    grid-area: 2 / 1 / 3 / 2;
  }

  .engagement-client .engagement:nth-child(3) { 
    grid-area: 2 / 2 / 3 / 3;
  }
  .engagement-client .engagement:nth-child(4) { 
    grid-area: 2 / 3 / 3 / 4; 
  }

  .engagement:nth-child(n+2),
  .engagement:last-child {
    border: none;
  }

  .aboutus .container {
    grid-template-columns: 1fr 2fr;
    gap: 20px;
  }

  .footer .contact-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: space-between;
  }

  .footer .brand {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
  }

  .page-media {
    margin: 40px 0;
    padding-bottom: 40px;
  }

  .page-rich-text {
    margin-bottom: 40px;
  }

  .page-product-media  {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .contact-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
  }
  
}

@media only screen and (min-width: 960px) {

  .aboutus .container {
    grid-template-columns: 400px auto;
  }

  .footer-nav {
    display: flex;
    gap: 20px;
  }

  .footer-nav li {
    margin-left: 0;
  }

  .legals .container {
    grid-template-columns: repeat(2, auto);
    justify-content: space-between;
  }

  .copyrights {
    margin: 0;
  }
  
}

@media only screen and (min-width: 1280px) {
  .container {
    padding: 40px 0;
  }
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

