/* =========================================================================
   composants.css — elements mutualises : nav, selecteur de langue, menu mobile,
   bloc contact + formulaire, footer, bandeau cookies.
   ========================================================================= */

/* ================= nav ================= */
header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  /* inversion permanente : noir sur fond clair, blanc sur fond sombre */
  background: transparent;
  color: #fff;
  mix-blend-mode: difference;
  isolation: auto;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  visibility: hidden
}

body.is-ready header {
  opacity: 1;
  transform: none;
  visibility: visible
}

.nav-name {
  font-size: .9rem;
  letter-spacing: .06em;
  font-weight: 500;
  justify-self: start;
  white-space: nowrap
}

.nav-center {
  display: flex;
  gap: 26px;
  justify-self: center
}

.nav-center a {
  font-size: .80rem;
  padding: 9px 0;
  white-space: nowrap;
  transition: color .25s;
  text-decoration: none;
  text-underline-offset: 6px
}

.nav-center a:hover {
  opacity: .55;
  text-decoration: underline
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end
}



/* sélecteur de langues : la langue active ouvre les autres */
#selecteur {
  position: relative
}

#selecteur>button {
  font-size: .66rem;
  letter-spacing: .14em;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 7px
}

#selecteur>button::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .3s var(--ease)
}

#selecteur.is-open>button::after {
  transform: rotate(-135deg) translateY(-1px)
}

#selecteur ul {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  list-style: none;
  background: #000;
  display: none;
  flex-direction: column
}

#selecteur.is-open ul {
  display: flex
}

#selecteur ul a {
  width: 100%;
  text-align: left;
  font-size: .66rem;
  letter-spacing: .14em;
  padding: 9px 12px;
  transition: background .2s, color .2s
}

#selecteur ul a:hover {
  background: #fff;
  color: #000
}

#burger {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  justify-self: end
}

#burger figure {
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform .35s var(--ease)
}

#burger.is-open figure:first-child {
  transform: translateY(4.2px) rotate(45deg)
}

#burger.is-open figure:last-child {
  transform: translateY(-4.2px) rotate(-45deg)
}

/* menu mobile : panneau séparé depuis la gauche (source index 2) */
/* la visibilité n'est coupée qu'après la sortie, pour que le panneau reparte bien vers la gauche */
.menu-mobile {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--blanc);
  color: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 34px;
  transform: translateX(-100%);
  transition: transform .6s var(--ease), visibility 0s linear .6s;
  visibility: hidden
}

.menu-mobile.is-open {
  transform: translateX(0);
  transition: transform .6s var(--ease), visibility 0s linear 0s;
  visibility: visible
}

.menu-mobile a {
  font-size: 1.5rem;
  letter-spacing: .05em;
  text-transform: capitalize;
  padding: 14px 0;
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity .38s var(--ease), transform .38s var(--ease)
}

.menu-mobile.is-open a {
  opacity: 1;
  transform: none
}

.menu-mobile.is-open a:nth-child(1) {
  transition-delay: .18s
}

.menu-mobile.is-open a:nth-child(2) {
  transition-delay: .24s
}

.menu-mobile.is-open a:nth-child(3) {
  transition-delay: .3s
}

.menu-mobile.is-open a:nth-child(4) {
  transition-delay: .36s
}

.menu-mobile__extra {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  opacity: 0;
  transition: opacity .5s var(--ease) .44s
}

.menu-mobile.is-open .menu-mobile__extra {
  opacity: 1
}

/* langues du menu mobile : encre sur fond blanc */
.menu-mobile__extra .mlang {
  display: flex;
  border: 1px solid var(--ink)
}

.menu-mobile__extra .mlang a {
  font-size: .66rem;
  letter-spacing: .12em;
  padding: 9px 13px;
  color: var(--ink);
  transition: background .2s, color .2s
}

.menu-mobile__extra .mlang a.is-active {
  background: var(--ink);
  color: #fff
}

.menu-mobile__foot {
  margin-top: 34px;
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gris);
  opacity: 0;
  transition: opacity .5s var(--ease) .5s
}

.menu-mobile.is-open .menu-mobile__foot {
  opacity: 1
}

@media (max-width:900px) {
  header {
    grid-template-columns: 1fr auto
  }

  #burger {
    display: flex;
    position: relative;
    z-index: 96
  }

  .nav-center,
  .nav-right {
    display: none
  }
}

/* ================= CONTACT : 100vh, grille mosaïque ================= */
.contact {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2vh) var(--pad) 4vh;
  border-top: 1px solid var(--hairline);
  scroll-snap-align: start;
  scroll-snap-stop: always
}

@supports (height:100svh) {
  .contact {
    min-height: 100svh
  }
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
  max-width: 1300px;
  width: 100%;
  margin: 0 auto
}

.contact__grid form {
  display: contents
}

@media (min-width:900px) {
  .contact__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "titre titre titre photo"
      "tel tel tel photo"
      "nom soc cmail send"
      "besoin besoin besoin send"
  }

  .c-titre {
    grid-area: titre
  }

  .c-photo {
    grid-area: photo
  }

  .c-tel {
    grid-area: tel
  }

  .c-nom {
    grid-area: nom
  }

  .c-soc {
    grid-area: soc
  }

  .c-cmail {
    grid-area: cmail
  }

  .c-besoin {
    grid-area: besoin
  }

  .c-send {
    grid-area: send
  }
}

@media (max-width:899px) {

  /* portrait et téléphone sur la même ligne, le reste sans case vide */
  .c-titre,
  .c-cmail,
  .c-besoin,
  .c-send {
    grid-column: 1 / -1
  }

  .c-photo {
    aspect-ratio: 1/1
  }

  .c-tel {
    aspect-ratio: 1/1;
    justify-content: flex-end
  }
}

.contact__cell {
  background: var(--blanc);
  padding: clamp(18px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0
}

/* photo carrée */
.c-photo {
  padding: 0;
  aspect-ratio: 1/1;
  background: var(--ink) center/cover no-repeat
}

/* une information par case */
.contact__cell .cell-anim {
  display: flex;
  flex-direction: column
}

.contact__cell .cell-label {
  font-size: .66rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 8px
}

.contact__cell .cell-value {
  font-size: .95rem;
  line-height: 1.5
}

.contact__cell .cell-value a:hover {
  opacity: .55
}

/* case téléphone : cliquable, disponible maintenant */
.c-tel {
  background: var(--blanc);
  color: var(--ink);
  gap: 6px;
  position: relative;
  transition: opacity .25s
}

.c-tel:hover {
  background: blue;
  color: white;
}

.c-tel .cell-label {
  color: blue;
  margin-bottom: 2px
}

.c-tel:hover .cell-label {
  color: white;
}

.c-tel .cell-value {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -.01em
}

.c-titre h2 {
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.05
}

.contact__cell label {
  display: block;
  font-size: .66rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gris)
}

.contact__cell input,
.contact__cell textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 0 0;
  font-family: inherit;
  font-size: .98rem;
  color: var(--ink);
  border: none;
  background: transparent;
  border-radius: 0
}

.contact__cell input:focus,
.contact__cell textarea:focus {
  outline: 0
}

.contact__cell textarea {
  min-height: 84px;
  resize: vertical
}

/* case d'envoi : le bouton remplit la case */
.c-send {
  padding: 0
}

.c-send button {
  width: 100%;
  height: 100%;
  min-height: 90px;
  background: var(--ink);
  color: #fff;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: opacity .25s
}

.c-send button:hover {
  opacity: .88
}

.form__ok {
  display: none;
  padding: 10px 16px;
  font-size: .82rem;
  text-align: center
}

.form__ok.is-visible {
  display: block
}

/* ================= FOOTER (index 2) ================= */
.footer {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always
}

@supports (height:100svh) {
  .footer {
    height: 100svh
  }
}


@keyframes marquee {
  to {
    transform: translateX(-50%)
  }
}
 
.footer__slogan {
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  padding: calc(var(--nav-h) + clamp(24px, 4vh, 56px)) 0 clamp(20px, 3vh, 40px);
  overflow: hidden
}
 
.footer__slogan-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite
}
 
.footer__slogan-track span {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  font-weight: 500;
  letter-spacing: .01em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 6vw;
  color: #fff;
  transition: none
}

.footer__grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: center;
  gap: clamp(18px, 3vh, 40px);
  padding: clamp(24px, 4vh, 70px) var(--pad);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  overflow: auto
}

.footer__brand p {
  margin-top: 14px;
  font-size: .88rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .55);
  max-width: 300px
}

.footer__cg {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 9px
}

.footer__col-title {
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 6px
}

.footer__col a,
.footer__col address {
  font-style: normal;
  font-size: .88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .78)
}

.footer__col a:hover {
  color: #fff
}

.footer__legal {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: clamp(16px, 2.4vh, 30px) var(--pad);
  font-size: .74rem;
  color: rgba(255, 255, 255, .5)
}

.footer__legal-links {
  display: flex;
  gap: 20px
}

.footer__legal-links a:hover {
  color: #fff
}

@media (min-width:900px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px
  }
}

@media (max-width:520px) {
  .footer__slogan-track span {
    font-size: 2rem
  }

  .footer__col a,
  .footer__col address,
  .footer__brand p {
    font-size: .8rem
  }
}


/* =========================================================================
   FORMULAIRE — etats de validation et messages (mutualise)
   ========================================================================= */
.contact__cell input:invalid:not(:placeholder-shown),
.contact__cell input.est-invalide,
.contact__cell textarea.est-invalide {
  border-bottom-color: #c0392b
}

.contact__cell .champ-obligatoire {
  color: var(--gris);
  margin-left: 3px
}

.form__note {
    grid-column: 1 / -1;
    font-size: .68rem;
    letter-spacing: .04em;
    color: white;
    padding: 15px;
    text-align: center;
}

.form__alerte {
  grid-column: 1/-1;
  border: 1px solid #c0392b;
  color: #c0392b;
  font-size: .78rem;
  padding: 12px 16px;
  margin-bottom: 8px
}

/* pot de miel : jamais visible, jamais focusable au clavier */
.pot-de-miel {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden
}

/* =========================================================================
   BANDEAU COOKIES + MODALE (mutualises sur toutes les pages)
   ========================================================================= */
@keyframes cookie-apparition {
  0%, 55% { opacity: 0; transform: translateY(18px) }
  100%    { opacity: 1; transform: none }
}

.cookie-banner {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  background: var(--ink);
  color: #fff;
  padding: 18px var(--pad);
  animation: cookie-apparition 4s cubic-bezier(.16, 1, .3, 1)
}

.cookie-banner.est-visible { display: flex }

.cookie-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto
}

.cookie-content p {
  flex: 1 1 320px;
  font-size: .82rem;
  line-height: 1.55;
  margin: 0
}

@media (max-width:700px) {
  .cookie-content p {
    flex: 1 1 auto;
    font-size: .76rem;
    line-height: 1.4
  }
}

.cookie-content p a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px
}

.cookie-btn {
  font-family: inherit;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .25s, color .25s, opacity .25s
}

.cookie-btn.accept {
  background: #fff;
  color: var(--ink)
}

.cookie-btn.accept:hover { opacity: .78 }

.cookie-btn.reject:hover,
.cookie-btn.manage:hover {
  background: #fff;
  color: var(--ink)
}

.cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .55);
  align-items: center;
  justify-content: center;
  padding: 20px
}

.cookie-modal.est-visible { display: flex }

.cookie-modal-content {
  background: var(--blanc);
  color: var(--ink);
  max-width: 520px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 34px
}

.cookie-modal-content h2 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 12px
}

.cookie-modal-content .modal-intro {
  font-size: .82rem;
  line-height: 1.6;
  color: var(--gris);
  margin-bottom: 22px
}

.cookie-modal-content label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .84rem;
  padding: 13px 0;
  border-top: 1px solid var(--hairline);
  cursor: pointer
}

.cookie-modal-content label:last-of-type { border-bottom: 1px solid var(--hairline) }

.cookie-modal-content input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--ink);
  flex: none
}

.cookie-modal-content label span small {
  display: block;
  color: var(--gris);
  font-size: .72rem;
  margin-top: 3px
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 24px
}

.modal-buttons .cookie-btn {
  border-color: var(--ink);
  color: var(--ink)
}

.cookie-btn.save {
  background: var(--ink);
  color: #fff
}

.cookie-btn.save:hover { opacity: .8 }

.cookie-btn.close:hover {
  background: var(--ink);
  color: #fff
}

/* lien de revocation dans le pied de page */
.change-consent-btn {
  display: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px
}

.change-consent-btn:hover { opacity: .6 }

@media (max-width:700px) {
  .cookie-banner {
    padding: 16px 20px 20px
  }

  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px
  }

  .cookie-content p {
    font-size: .78rem
  }

  .cookie-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  /* Refuser et Personnaliser : côte à côte, fond noir */
  .cookie-btn.reject,
  .cookie-btn.manage {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.35);
    font-size: .62rem;
    padding: 10px 8px
  }

  /* Accepter : pleine largeur en bas, fond blanc */
  .cookie-btn.accept {
    grid-column: 1 / -1;
    background: #fff;
    color: var(--ink);
    border-color: #fff;
    order: 3;
    padding: 14px;
    font-size: .68rem
  }

  .cookie-btn.accept:hover { opacity: .78 }

  .cookie-btn.reject:hover,
  .cookie-btn.manage:hover {
    background: rgba(255,255,255,.1);
    color: #fff
  }
}
