/* =========================================================
   HOME + SPLIT (FUSION CLEAN) — sans conflits
   Remplace style-home.css + style-split.css
   ========================================================= */

/* =========================
   VARIABLES
   ========================= */
:root{
  --bg-dark: #182542;
  --overlay: rgba(10,15,25,0.65);
  --text-light: #ffffff;

  /* espace stable ~1cm visuel */
  --gap-1cm-px: 38px;
}

/* =========================
   RESET / BASE
   ========================= */
*{ box-sizing:border-box; margin:0; padding:0; }
html, body{ height:100%; }

body{
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  display:flex;
  flex-direction:column;
}

/* =========================
   BACKGROUND (HOME)
   ========================= */
.bg-video{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -3;
  pointer-events:none;
}

/* Home: pas de video */
.page-home .bg-video{ display:none; }

.page-overlay{
  position: fixed;
  inset: 0;
  background: rgba(187, 194, 207, 0.15);
  z-index: -2;
}

.bg-logo{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

/* =========================
   IMAGE FIXE (Nous.png)
   ========================= */
.imagexxx{
  position: fixed;
  width: 70vw;
  height: 70vh;
  top: 70%;
  left: 50%;
  right: 0%;
  transform: translate(-50%, -50%);
  pointer-events:none;
  z-index: 0;
}

.imagexxx img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display:block;
}

/* mobile : on réduit et on recentre */
@media (max-width: 900px){
  .imagexxx{
    width: 92vw;
    height: 40vh;
    top: 60%;
    left: 50%;
  }
}

/* =========================
   CONTENT WRAPPER
   ========================= */
.page-content{
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 6% 60px;
  flex: 1 0 auto;
}

/* Sur HOME : libère la largeur pour le split full viewport */
.page-home .page-content{
  max-width: none;
  width: 100%;
  margin: 0;
}

/* =========================
   I18N VISIBILITY
   ========================= */
[data-lang]{ display:inline; }
/* défaut FR */
[data-lang]:not([data-lang="fr"]){ display:none; }

/* on s'assure que le texte dans who-mini reste inline */
.who-mini [data-lang]{ display:inline; }

/* =========================================================
   SPLIT FULL VIEWPORT (HOME)
   ========================================================= */
.page-home .contact-split{
  display: grid;
  grid-template-columns: calc(50vw - 0.5cm) calc(50vw - 0.5cm);
  column-gap: 1cm;

  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  align-items: stretch;
}

/* anti-débordement */
.page-home .contact-left,
.page-home .contact-right{
  min-width: 0;
}

/* =========================================================
   ROTATEUR (gauche)
   ========================================================= */
.page-home .contact-left{
  display: flex;
  align-items: flex-start;
}

/* conteneur image rotator */
.page-home .home-image-rotator{
  position: relative;
  aspect-ratio: 1 / 0.8; /* garde ton rendu actuel */
  width: 90%;
  height: auto;

  border-radius: 16px;
  overflow: hidden;
}

/* image plein cadre */
.page-home .home-image-rotator > img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* =========================================================
   COLONNE DROITE TEXTE (2ème bloc)
   ========================================================= */
.page-home .contact-right{ width: 100%; }

.page-home .accueil-right-text{
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 20px;
}

/* =========================================================
   MOBILE – 1 COLONNE
   ========================================================= */
@media (max-width: 900px){
  .page-home .page-content{
    padding-left: 5%;
    padding-right: 5%;
  }

  .page-home .contact-split{
    grid-template-columns: 1fr;
    column-gap: 0;
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }
}

/* =========================================================
   WHO CARD (Qui sommes-nous)
   ========================================================= */
.who-card{
  position: relative;
  border-radius: 18px;
  padding: 26px 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.20);
  overflow: hidden;
  min-height: 180px;
}

.who-title{
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .3px;
}

/* couche hover (le “Plus de détails...”) */
.who-hover{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px;

  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.05));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;

  /* IMPORTANT: évite de bloquer les clics quand invisible */
  pointer-events: none;
}

.who-card:hover .who-hover{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.who-mini{
  margin: 0;
  font-size: 40px;
  line-height: 1.55;
  opacity: .95;
  max-width: 52ch;
}

.who-arrow{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
  flex: 0 0 auto;
}
.who-arrow--fixed{
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
}

.who-arrow:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.22);
}



/* =========================================================
   BASE MODAL (commun aux 3)
   ========================================================= */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  z-index: 999999;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px;
}

.modal-overlay.is-open{
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-box{
  width: min(980px, 92vw);
  margin: 0;

  border-radius: 18px;
  background: rgba(20,22,28,0.96);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);

  max-height: calc(100vh - 48px);
  overflow: hidden;
  position: relative;
  padding: 18px 18px 14px;
}

.modal-title{
  margin: 8px 46px 12px 8px;
  font-size: clamp(22px, 2.2vw, 40px);
  line-height: 1.2;
}

.modal-close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.modal-body{
  padding: 8px 10px 16px;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: clamp(15px, 1.05vw, 30px);
  opacity: .96;
}

/* RTL */
html[dir="rtl"] .modal-body{
  line-height: 1.9;
}



/* les 3 modales doivent être position:relative pour le ::before */
.about-overlay .about-modal{
  position: relative;
  overflow: hidden;
}

/* Contenu au-dessus */
.about-overlay .about-modal > *{
  position: relative;
  z-index: 1;
}

/* MODALE 1 */
#aboutOverlay1 .about-modal::before{
  content:"";
  position:absolute;
  inset:0;
  background: url("images/accueil/image3.png") center/cover no-repeat;
  opacity: 0.25;
  z-index: 0;
}

/* MODALE 2 */
#aboutOverlay2 .about-modal::before{
  content:"";
  position:absolute;
  inset:0;
  background: url("images/accueil/informatique1.png") center/cover no-repeat;
  opacity: 0.35;
  z-index: 0;
}

/* MODALE 3 */
#aboutOverlay3 .about-modal::before{
  content:"";
  position:absolute;
  inset:0;
  background: url("images/accueil/image6.png") center/cover no-repeat;
  opacity: 0.35;
  z-index: 0;
}


/* contenu au-dessus du fond */
.modal-box > *{
  position: relative;
  z-index: 1;
}

/* =========================
   ABOUT (3 modales) — isolé du footer
   ========================= */
.aboutx-scope.about-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  z-index: 999999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px;
}

.aboutx-scope.about-overlay.is-open{
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.aboutx-scope .about-modal{
  width: min(980px, 92vw);
  margin: 0;
  border-radius: 18px;
  background: rgba(20,22,28,0.96);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  position: relative;
  padding: 18px 18px 14px;
}

.aboutx-scope .about-title{
  margin: 8px 46px 12px 8px;
  font-size: clamp(22px, 2.2vw, 40px);
  line-height: 1.2;
}

.aboutx-scope .about-close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.aboutx-scope .about-body{
  padding: 8px 10px 16px;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: clamp(15px, 1.05vw, 30px);
  opacity: .96;
  font-family: Arial, Helvetica, sans-serif;
}

html[dir="rtl"] .aboutx-scope .about-body{
  line-height: 1.9;
}

/* =========================================================
   ABOUT MODALS (indépendantes du footer)
   ========================================================= */

.about-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  z-index: 999999;
  padding: 24px 16px;
}

.about-overlay.is-open{
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
}

.about-overlay .about-modal{
  width: min(980px, 92vw);
  border-radius: 18px;
  background: rgba(20,22,28,0.96);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  padding: 18px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.about-overlay .about-body{
  overflow-y: auto;
  max-height: calc(100vh - 140px);
}

/* =========================
   ROTATEUR HOME
   ========================= */
.home-image-rotator{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.home-image-rotator .js-rotator-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transition: opacity 1400ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity;
}

.home-image-rotator .js-rotator-img.is-active{
  opacity: 1;
}

/* sécurité si JS KO */
.home-image-rotator .js-rotator-img:first-child{
  opacity: 1;
}


/* =========================
   CADRE TEXTE WHO-MINI
   ========================= */
.who-mini{
  display: inline-block;          /* cadre ajusté au texte */
  background: rgba(0,0,0,0.75);   /* fond noir semi-transparent */
  color: #fff;                    /* texte blanc lisible */
  padding: 14px 18px;             /* espace interne */
  border-radius: 12px;            /* coins arrondis */
  line-height: 1.6;
  max-width: 90%;                 /* évite débordement */
  backdrop-filter: blur(4px);     /* effet léger premium */
}


/* Projets : même rendu visuel que home */
.page-projects .bg-video { display: none; }

/* Hero */
.projects-hero{
  padding: 12px 0 22px;
}
.projects-title{
  font-size: clamp(28px, 3vw, 44px);
  margin-bottom: 10px;
}
.projects-subtitle{
  max-width: 900px;
  opacity: 0.85;
  line-height: 1.6;
}

/* Sections */
.section-head{
  margin: 18px 0 14px;
}
.section-head h2{
  font-size: 22px;
  margin-bottom: 6px;
}
.section-sub{
  opacity: 0.8;
  line-height: 1.6;
}

/* Partners */
.partners-grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.partner-card{
  border-radius: 14px;
  padding: 14px;
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 90px;
}

.partner-card img{
  max-width: 150%;
  max-height: 80px;
  object-fit: contain;
  opacity: 0.95;
}

/* =========================
   PROJECTS — PREMIUM CARDS
   ========================= */
.projects-section{
  margin-top: 10px;
  display: grid;
  gap: 14px;
}

/* Card */
.project-card{
  background: linear-gradient(180deg, rgba(15,23,42,0.62), rgba(15,23,42,0.40));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  overflow: hidden;

  display: grid;
  grid-template-columns: 320px 1fr;
  align-items: stretch; /* correction principale */

  box-shadow:
    0 10px 24px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.06);

  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  will-change: transform;
}

/* Premium hover */
.project-card:hover{
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.22);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Media block */
.project-media{
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.25); /* ou un dégradé premium */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-media img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}


/* Subtle shine overlay */
.project-media::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 200px at 20% 10%, rgba(255,255,255,0.12), transparent 55%),
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.06) 35%, transparent 70%);
  opacity: 0.0;
  transition: opacity 320ms ease;
  pointer-events: none;
}

.project-card:hover .project-media img{
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.03);
}

.project-card:hover .project-media::after{
  opacity: 1;
}

/* Body */
.project-body{
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Optional typography helpers */
.project-title{
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.project-meta{
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.35;
}

/* =========================
   RESPONSIVE (mobile)
   ========================= */
@media (max-width: 860px){
  .project-card{
    grid-template-columns: 1fr;
  }

  .project-media{
    height: 200px; /* hauteur fixe sur mobile */
    min-height: unset;
  }

  .project-body{
    padding: 16px;
  }
}

@media (max-width: 420px){
  .project-media{
    height: 170px;
  }
}


.project-title{
  font-size: 18px;
  font-weight: 800;
}

.project-meta{
  opacity: 0.85;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 6px;
}

.project-tags{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tag{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
}

.project-text{
  opacity: 0.9;
  line-height: 1.7;
}

/* Buttons (cohérent) */
.btn-primary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#fff;

  padding: 12px 16px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(6px);

  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.btn-primary:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.45);
}

/* Responsive */
@media (max-width: 1100px){
  .partners-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px){
  .project-card{ grid-template-columns: 1fr; }
  .project-media{ height: 220px; }
}

@media (max-width: 560px){
  .partners-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Conteneur */
.project-media{
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
}

/* Le lien devient le wrapper, sans changer le layout */
.project-media a.project-link{
  display: block;
  width: 100%;
  line-height: 0;         /* supprime tout “gap” inline */
  margin: 0;
  padding: 0;
  text-decoration: none;
}

/* Image = comme ta solution 2 (qui marche) */
.project-media a.project-link img{
  width: 100%;
  height: auto;
  display: block;         /* supprime l’espace baseline */
}

/* Overlay hover (ne pousse rien) */
.project-media a.project-link::after{
  content: "Voir le projet";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.project-media:hover a.project-link::after{
  opacity: 1;
}
