/* ==========================================================================
   ICC Intranet — feuille de styles
   --------------------------------------------------------------------------
   Reprend à l'identique les valeurs du site d'origine (CMS Zébulon V2 :
   common.css, header.css, menu.css, sections.css, footer.css, pages.css,
   popUp.css), réécrites en un seul fichier. Valeurs vérifiées dans Chrome
   sur une copie locale de l'ancien site.

   Écarts demandés : conteneur des sections un peu moins large
   (--container, voir plus bas) ; espace membre remplacé par un message.

   Convention de nommage : BEM — .bloc, .bloc__element, .bloc--variante.
   États : .is-open, .is-current, .is-revealed ; html.js / html.no-js.
   ========================================================================== */

/* Polices — fichiers d'origine (Lato), hébergés localement */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-regular-webfont.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Lato Bold';
  src: url('../fonts/lato-bold-webfont.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Raleway Light';
  src: url('../fonts/raleway-light-webfont.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Raleway SemiBold';
  src: url('../fonts/raleway-semibold-webfont.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/opensans-regular-webfont.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Lato Black';
  src: url('../fonts/lato-black-webfont.woff2') format('woff2');
  font-display: swap;
}

:root {
  --turquoise: #00a49d;
  --turquoise-menu: #00a0a1;
  --bleu: #0078bb;
  --bleu-clair: #84d3f4;
  --texte: #171715;
  --gris: #5e6060;
  --gris-menu: #555;
  --gris-bordure: #e7e7e7;
  --blanc: #fff;
  --noir: #000;

  --font: 'Lato', sans-serif;
  --font-bold: 'Lato Bold', sans-serif;
  --font-black: 'Lato Black', sans-serif;

  --header-height: 100px;
  /* Largeur du contenu des sections : 68 % de la fenêtre à l'origine (marges de 16 %) ;
     un peu moins large à la demande du client : 60 %, plafonné à 1100 px (largeur des pages
     légales d'origine). Tablettes et téléphones gardent les marges d'origine. */
  --container: min(60%, 1100px);
  /* Largeur du contenu de l'en-tête (logo + menu) : 84 % à l'origine (marges de 8 %) ;
     plafonnée à 1300 px sur grand écran, à la demande du client. */
  --container-wide: min(84%, 1300px);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html, body { height: 100%; }

html { scroll-padding-top: var(--header-height); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: url('../img/concrete-seamless.png');
}

*, *::before, *::after {
  box-sizing: border-box;
  transition-property: background, width, height, margin, padding, border, color, transform, opacity;
  transition-duration: 0.2s;
  transition-timing-function: ease-in-out;
}

ul, li { margin: 0; padding: 0; }

h1 { font-size: 60px; color: var(--blanc); }
h2 { font-family: var(--font-black); font-size: 40px; }

a { color: inherit; }

img { max-width: 100%; }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000000;
  padding: 10px 16px;
  background: var(--texte);
  color: var(--blanc);
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 2px; }

.placeholder { background: #fff59d; color: var(--noir); }

/* --------------------------------------------------------------------------
   En-tête fixe
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  z-index: 9;
  width: 100%;
  border-bottom: 1px solid var(--gris-bordure);
  background: var(--blanc);
}

.site-header__content {
  width: var(--container-wide);
  margin: 0 auto;
}

/* Logo texte « ICC / Ingénierie Contrôle et Conseil » */
.site-header__logo {
  display: inline-block;
  width: 200px;
  height: 80px;
  margin-top: 15px;
  font-family: var(--font-bold);
  color: var(--turquoise);
  text-decoration: none;
}
.site-header__name { font-size: 50px; }
.site-header__baseline { font-size: 14px; }

.main-nav {
  display: inline-block;
  float: right;
  vertical-align: top;
}

.main-nav__list { list-style: none; font-size: 20px; }   /* espaces entre les entrées : ceux des liens de 20 px d'origine */

.main-nav__item {
  display: inline-block;
  margin: 40px 20px;
}

/* Soulignement turquoise animé au survol et sur la section courante */
.main-nav__link {
  position: relative;
  font-size: 20px;
  color: var(--texte);
  text-decoration: none;
}
.main-nav__link::before {
  content: '';
  position: absolute;
  right: 0;                    /* toute la largeur du lien (20 % de retrait de chaque côté à l'origine) */
  bottom: -5px;
  left: 0;
  height: 1px;
  background: var(--turquoise);
  opacity: 0;
  transform: translate(0, 2px) scaleX(0.75);
  transition: all 0.35s ease;
}
.main-nav__link:hover::before,
.main-nav__link:focus-visible::before,
.main-nav__link.is-current::before {
  opacity: 1;
  transform: translate(0, 0) scaleX(1);
}

/* Bouton MENU (≤ 1068 px) */
.menu-button {
  display: none;
  padding: 0;
  border: 0;
  font: inherit;
  color: var(--noir);
  background: none;
  cursor: pointer;
}
.menu-button__label {
  display: inline-block;
  margin-right: 10px;
  vertical-align: 27%;
}
.menu-button__icon { display: inline-block; }
/* Panneau ouvert : le bouton MENU s'efface, la croix du panneau prend sa place (comme l'origine) */
.menu-button[aria-expanded="true"] { opacity: 0; }

/* --------------------------------------------------------------------------
   Panneau « flip-flap » : menu plein écran qui glisse depuis la gauche
   -------------------------------------------------------------------------- */
.flipflap {
  position: fixed;
  top: var(--header-height);   /* sous l'en-tête, qui reste visible (comme l'origine) */
  left: -100%;
  z-index: 999999;
  width: 100%;
  min-height: 100%;
  border-top: 1px solid var(--turquoise-menu);
  visibility: hidden;
  transition: left 0.7s, visibility 0s 0.7s;
}
.flipflap.is-open {
  left: 0;
  visibility: visible;
  transition: left 0.7s, visibility 0s;
}

.flipflap__close {
  display: none;
  position: fixed;
  top: 30px;
  right: 8%;
  z-index: 1;
  padding: 0;
  border: 0;
  font-size: 25px;
  line-height: 1;
  color: var(--texte);
  background: none;
  cursor: pointer;
}
.flipflap.is-open .flipflap__close { display: block; }
.flipflap__close .icon { width: 0.8em; height: 1em; fill: currentColor; }

/* Voile blanc sur toute la hauteur de l'écran (hauteur de la fenêtre fixée par le script d'origine) */
.flipflap__content { height: 100vh; background: rgba(255, 255, 255, 0.75); }

.flipflap__list { list-style: none; }

.flipflap__item {
  height: 75px;
  border-bottom: 1px solid #aaa;
  font-size: 30px;
  text-align: center;
  color: var(--gris-menu);
}
.flipflap__item:hover { color: var(--blanc); background: var(--turquoise-menu); }

.flipflap__link {
  display: block;
  height: 100%;
  padding-top: 20px;
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Sections de l'accueil (hauteur d'écran)
   -------------------------------------------------------------------------- */
.section {
  /* Hauteur d'écran moins l'en-tête (pourcentage du <body> à l'origine, d'où vh ici) */
  height: calc(100vh - var(--header-height));
  min-height: 650px;
  overflow: hidden;
}

.section__content {
  width: var(--container);
  margin: 8% auto;
}

.section__title {
  position: relative;
  margin: 0 0 100px;
  padding: 0;
}

/* Double trait bleu derrière les titres */
.section__title::before {
  content: '';
  position: absolute;
  top: -50%;
  left: calc(50% - 40px);
  width: 80px;
  height: 200%;
  border-top: 6px solid var(--bleu);
  border-bottom: 6px solid var(--bleu);
}

/* Accueil : photo plein écran, titre centré */
.accueil {
  display: flex;
  align-items: center;
  margin-top: var(--header-height);
  background: url('../img/visual.jpg') 0 0 / cover;   /* ancrée en haut à gauche, comme l'origine */
}
.accueil__center { width: 100%; }

.accueil__title {
  margin: 0;
  padding: 0;
  font-family: var(--font-black);
  letter-spacing: 0.03em;
  text-align: center;
  text-shadow: 0 0 10px #606565;
}

.accueil__subtitle {
  margin: 0 0 100px;
  text-align: center;
  color: var(--blanc);
  text-shadow: 0 0 5px #000;
}

/* La société : fond turquoise, texte à gauche, dessin animé à droite */
.societe {
  text-align: center;
  color: var(--blanc);
  background: var(--turquoise);
}

.societe__text {
  display: inline-block;
  width: 70%;
  margin-top: 20px;
  vertical-align: top;
  text-align: left;
}
.societe__text p { font-size: 1.1em; line-height: 24px; }

.societe__visual {
  display: inline-block;
  width: 30%;
  vertical-align: top;
}
.societe__drawing { max-width: 100%; height: auto; }

/* Nos missions : fond blanc, puces carrées turquoise */
.missions { background: var(--blanc); }
.missions .section__content { margin: 4% auto; }

.missions .section__title,
.connexion__title {
  display: inline-block;
  margin-bottom: 50px;
}
.missions .section__title::before,
.connexion__title::before { left: 10px; }

.missions__title { font-size: 1.17em; margin: 1em 0; }

.missions__list { list-style: none; }

.missions__item {
  margin: 0 0 10px 25px;
}
.missions__item::before {
  content: '■ ';
  padding: 0 10px 5px 0;
  vertical-align: 10%;
  color: var(--turquoise);
}

/* Connexion : photo, formulaire (espace membre en cours de refonte) */
.connexion {
  height: 68vh;
  background: url('../img/visual2.jpg') 0 0 / cover;
}
.connexion .section__content { margin: 6% auto; }

.connexion__title {
  margin: 0.83em 0 80px;
  color: var(--blanc);
}

.connexion__form {
  width: 400px;
  text-align: right;
}

.connexion__input {
  width: 100%;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 5px;
  font-family: sans-serif;
  font-size: 16px;
  color: #222;
  background: rgba(216, 216, 216, 0.6);
}
.connexion__input::placeholder { color: #757575; }
.connexion__input:focus { outline: none; color: var(--texte); background: rgba(255, 255, 255, 0.5); }

.connexion__button {
  display: inline-block;
  margin-bottom: 5px;
  padding: 12px 32px;
  border: 1px solid #333;
  border-radius: 5px;
  font-family: var(--font);
  font-size: 16px;
  color: #ddd;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.connexion__button:hover,
.connexion__button:focus-visible {
  border-bottom: 4px solid var(--bleu-clair);
  color: var(--bleu-clair);
}

/* Contact */
.contact { text-align: center; }
.contact a { color: #2d3131; text-decoration: none; }
.contact a:hover,
.contact a:focus-visible { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Message « espace membre en cours de refonte » (style des pop-ups d'origine)
   -------------------------------------------------------------------------- */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
}
.popup:target,
.popup.is-open { display: flex; }

.popup__box {
  max-width: 520px;
  padding: 40px 30px 30px;
  border: 2px solid lightgray;
  border-radius: 20px;
  text-align: center;
  color: #252523;
  background: var(--blanc);
}

.popup__message {
  margin: 0 0 30px;
  font-size: 18px;
  line-height: 26px;
}

.popup__actions { margin: 0; }

.popup__button {
  display: inline-block;
  margin: 5px;
  padding: 10px 20px;
  border: 1px solid #2d3131;
  border-radius: 20px;
  color: var(--blanc);
  text-decoration: none;
  background: #2d3131;
}
.popup__button:hover,
.popup__button:focus-visible { border-color: #606565; background: #606565; }

.popup__button--secondary {
  border-color: #666;
  color: #666;
  background: none;
}
.popup__button--secondary:hover,
.popup__button--secondary:focus-visible { border-color: #666; color: var(--blanc); background: #999; }

/* --------------------------------------------------------------------------
   Pages secondaires (mentions légales, confidentialité, cookies, 404)
   -------------------------------------------------------------------------- */
.display-area {
  width: 1100px;
  min-height: calc(100% - 160px);
  margin: 100px auto;
  line-height: 25px;
  text-align: justify;
}

.display-area__h1 {
  margin: 0.67em 0 20px;
  padding-top: 40px;
  font-size: 40px;
  color: var(--texte);
}

.display-area__content h2 {
  margin: 0.83em 0 0;
  padding-bottom: 0;
  font-size: 25px;
  font-weight: normal;
  color: var(--gris);
}

.display-area__content p { margin: 5px 0 30px; }

.display-area__content a { color: var(--noir); text-decoration: none; }
.display-area__content a:hover,
.display-area__content a:focus-visible { text-decoration: underline; }

.display-area__content ul { list-style: inside; }
.display-area__content li { margin-bottom: 10px; }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  width: 100%;
  padding: 20px 0;
  border-top: 1px solid var(--gris-bordure);
  text-align: center;
  background: var(--blanc);
}

.site-footer__list { list-style: none; }

.site-footer__item {
  display: inline-block;
  padding: 0 20px;
  color: var(--texte);
}

.site-footer__link {
  display: inline-block;       /* le trait du survol compte dans la hauteur, comme le bloc d'origine */
  border-bottom: 1px solid var(--blanc);
  color: var(--texte);
  text-decoration: none;
}
.site-footer__link:hover,
.site-footer__link:focus-visible { border-bottom-color: #51514a; }

/* --------------------------------------------------------------------------
   Bandeau cookies (bas de page, fondu de 500 ms après 3 s, comme l'origine)
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 9999000;
  width: 100%;
  padding: 1% 2%;
  border-top: 4px solid #444;
  font-family: 'Raleway Light', sans-serif;
  font-size: 14px;
  text-align: left;
  color: #444;
  background: rgba(255, 255, 255, 0.92);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-visible { animation: fadeIn 0.5s both; }

.cookie-banner__intro {
  float: left;
  width: 20%;
  font-family: 'Raleway SemiBold', sans-serif;
  font-size: 22px;
}

.cookie-banner__link { font-size: 18px; color: var(--turquoise); text-decoration: none; }
.cookie-banner__link:hover,
.cookie-banner__link:focus-visible { text-decoration: underline; }

.cookie-banner__body {
  float: left;
  width: 76%;
  margin-left: 4%;
}

.cookie-banner__text {
  float: left;
  width: 100%;
  margin: 0;
  padding-top: 10px;
}

.cookie-banner__buttons {
  float: left;
  width: 100%;
  margin-top: 15px;
}

/* Boutons arrondis : icône (26 × 24 avec ses marges) et libellé flottants, libellé décalé de 5 px */
.cookie-banner__button {
  display: inline-block;
  margin: 0 10px 3px 0;
  padding: 10px 18px;
  border: 1px solid #666;
  border-radius: 18px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  vertical-align: top;
  color: #666;
  background: none;
  cursor: pointer;
}
.cookie-banner__button:hover,
.cookie-banner__button:focus-visible { border-color: #666; color: var(--blanc); background: #999; }

.cookie-banner__icon {
  float: left;
  box-sizing: content-box;
  width: 16px;
  height: 16px;
  padding: 4px 5px;
  fill: currentColor;
}
.cookie-banner__button--refuse .cookie-banner__icon { margin-top: 3px; }

.cookie-banner__label {
  float: left;
  margin-top: 5px;
  line-height: normal;
}

@media (max-width: 900px) {
  .cookie-banner__intro { width: 100%; margin-left: 4%; }
  .cookie-banner__body { width: 96%; }
}

/* --------------------------------------------------------------------------
   Apparitions au défilement (WOW.js + animate.css d'origine)
   -------------------------------------------------------------------------- */
.js .reveal { visibility: hidden; }
.js .reveal.is-revealed { visibility: visible; animation: 1s both; }
.js .reveal.is-revealed[data-reveal="fadeIn"] { animation-name: fadeIn; }
.js .reveal.is-revealed[data-reveal="fadeInUp"] { animation-name: fadeInUp; }
.js .reveal.is-revealed[data-reveal="fadeInDown"] { animation-name: fadeInDown; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 100%, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translate3d(0, -100%, 0); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { visibility: visible; }
  .js .reveal.is-revealed { animation: none; }
  .flipflap, .flipflap.is-open { transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive — points de rupture d'origine
   -------------------------------------------------------------------------- */
@media (max-width: 1068px) {
  .main-nav { display: none; }
  .menu-button {
    display: block;
    float: right;
    margin: 35px 20px;
  }
  /* Sans JavaScript : le menu reste affiché à la place du bouton */
  .no-js .main-nav { display: inline-block; }
  .no-js .menu-button { display: none; }
  .no-js .main-nav__item { margin: 40px 10px; }

  .section { height: auto; }
  .section__content,
  .missions .section__content { width: auto; margin: 8%; }
  .connexion .section__content { width: auto; margin: 6% 8%; }
  .accueil { align-items: flex-start; min-height: 300px; }   /* hauteur automatique : plus de centrage, comme l'origine */
  .accueil__title { margin-top: 100px; }
  .societe__visual { display: none; }
  .societe__text { width: 100%; }
}

@media (max-width: 960px) {
  .display-area { width: 80%; margin: 100px auto 0; }
}

@media (max-width: 500px) {
  :root { --header-height: 78px; }
  .site-header__content { width: auto; margin: 0 4%; }
  .site-header__logo { width: 110px; height: auto; }
  .menu-button { margin: 24px 0; }
  .flipflap__close { top: 20px; right: 4%; }

  .section { min-height: 0; }
  .section__content { margin: 60px 4%; }
  .missions .section__content,
  .connexion .section__content { margin: 60px 8%; }
  .accueil { padding: 0 2%; }
  .accueil__title { padding-top: 80px; font-size: 45px; }
  .connexion__title::before { top: -10%; height: 130%; }
  .missions .section__title::before { top: -25%; height: 160%; }
  .connexion__form { width: 100%; }
  .missions__item { margin-left: 0; }

  .display-area { margin: 78px 4% 0; }   /* largeur de 80 % conservée, comme l'origine */
}
