/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media screen and (orientation: portrait) and (min-width: 1080px) and (max-height: 1920px) {
  body, html {
    overflow-y: scroll;
  }
  .grid-container {
    flex-direction: column;
    gap: 40px;
    height: auto;
    padding: 60px 20px;
  }
  .cube {
    width: 80%;
    height: 220px;
    font-size: 20px;
  }
}

body, html {
  width: 100%;
  height: 100%;
  font-family: "Open Sans", Arial, sans-serif;
  background-color: #ffffff;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* Utilitaire global pour tous les titres en dégradé */
.gradient-title{
  background: linear-gradient(to right, #283897, #425CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === LOGO CENTRÉ === */
.logo-container {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.logo-container img {
  height: 60px;
}

/* === LANG SELECTOR === */
.language-selector {
  position: absolute;
  top: 60px;
  right: 40px;
  z-index: 10;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background-color: #DA2020;
  color: white;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  min-width: 120px;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background-color: #f0f0f0;
}

.dropdown-menu.show {
  display: block;
}

/* === CUBES CONTAINER === */
.grid-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 90px;
  height: 100vh;
  padding: 0 40px;
}

/* === CUBES === */
.cube {
  background-color: white;
  box-shadow: 0 4px 20px #293896;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #293896;
  font-size: 25px;
  font-weight: bold;
  text-transform: uppercase;
  line-height: 1.6;
  width: 350px;
  height: 350px;
  border-bottom-right-radius: 20px;
}

/* === BANNIÈRE === */
.banner-component {
  width: 100%;
  max-width: 1920px;
  height: 840px;
  margin: 0 auto;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* === INTRO COMPONENT === */
.intro-component {
  display: flex;
  width: 1766px;
  height: auto;
  margin: 80px auto;
  margin-top: -350px;
  background-color: white;
  border-radius: 0 0 20px 0;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.intro-text {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro-text h2 {
  font-size: 40px;
  font-weight: bold;
  background: linear-gradient(to right, #283897, #425CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.intro-text p {
  font-size: 30px;
  line-height: 1.4;
  color: #1a1a1a;
}

.intro-image {
  flex-shrink: 0;
  width: 989.95px;
  display: flex;
  flex-direction: column;
}

.intro-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  margin-bottom: 20px; /* marge sous la photo */
}

/* === TITRES & TEXTES === */
.h3-gradient {
  font-size: 65px;
  font-weight: bold;
  background: linear-gradient(to right, #283897, #425CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin: 80px 0 40px;
  margin-bottom: 60px;
}

.text-block-centered {
  font-size: 30px;
  line-height: 1.4;
  text-align: center;
  color: #1a1a1a;
  max-width: 1500px;
  margin: 0 auto;
}

/* === VIDÉO === */
.video-container {
  display: flex;
  justify-content: center;
  margin: 60px auto;
}

.video-container video {
  width: 80%;
  max-width: 1587px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* === CHIFFRES CLÉS === */
.key-figures {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 350px;
  background-color: #e7e9f7;
  height: 250px;
  width: 100%;
  max-width: 1920px;
  margin: 60px auto;
}

.key-figure-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.h4-gradient {
  font-size: 70px;
  font-weight: bold;
  background: linear-gradient(to right, #283897, #425CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.key-figure-item p {
  font-size: 40px;
  margin-top: 10px;
  color: #1a1a1a;
}

/* === BLOCS SERVICES === */
.dual-blocks {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin: 80px auto;
  max-width: 1920px;
}

.content-block {
  width: 711.39px;
  height: 1002px;
  background-color: white;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0; /* pas de padding global pour coller l'image en haut */
}

.content-block img {
  width: 711px;
  height: 417px;
  object-fit: cover;
  display: block;
  margin-bottom: 30px; /* marge sous l'image */
}

.content-block h2,
.content-block p {
  padding: 0 30px; /* marges internes texte */
}

.content-block h2 {
  margin-bottom: 20px;
  font-size: 40px;
  font-weight: bold;
  background: linear-gradient(to right, #283897, #425CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.content-block p {
  font-size: 30px;
  line-height: 1.6;
  text-align: center;
  color: #1a1a1a;
}

.where-we-operate {
  margin: 80px auto;
  text-align: center;
  max-width: 1920px;
}

.operate-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* centre les deux lignes */
  gap: 20px; /* espace vertical entre les lignes */
  margin-top: 40px;
}

.operate-row {
  display: flex;
  justify-content: center;
  gap: 20px; /* espace horizontal entre les blocs */
}

.operate-block {
  width: 260px;
  height: 160px;
  border: 2px solid #283897;
  display: flex;
  flex-direction: column;
  justify-content: center; /* centre verticalement tout le contenu */
  align-items: center; /* centre horizontalement */
  gap: 15px; /* espace entre icône et texte */
  border-radius: 0 0 20px 0;
  font-size: 22px;
  font-weight: 600;
  color: #283897;
}

.operate-block img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.operate-block span {
  text-align: center;
}

.founder-banner {
  width: 100%;
  max-width: 1920px;
  height: 840px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

/* Dégradé blanc transparent pour lisibilité */
.founder-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0.95) 30%, rgba(255,255,255,0) 70%);
  display: flex;
  align-items: center;
}

/* Bloc texte */
.founder-text {
  max-width: 700px;
  padding: 60px 80px;
}

.founder-text h2 {
  font-size: 48px;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #1a1a1a;
}

/* Nom Pierre Bellon en dégradé corporate */
.gradient-text {
  background: linear-gradient(to right, #283897, #425CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.founder-text p {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 30px;
  color: #1a1a1a;
}

/* Bouton style capture */
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 25px;
  border: 2px solid #283897;
  border-radius: 6px 6px 20px 6px;
  background: white;
  color: #283897;
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-secondary .cta-arrow {
  color: #DA2020;
  font-size: 22px;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.cta-secondary:hover {
  background: #f5f5f5;
}

.cta-secondary:hover .cta-arrow {
  transform: translateX(5px);
}

/* Overlay plein écran */
.video-popup {
  display: none; /* caché par défaut */
  position: fixed;
  z-index: 9999;
  inset: 0; /* équivalent de top:0;left:0;width:100%;height:100% */
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.video-popup-content {
  position: relative;
  width: 80%; /* largeur contrôlée */
  max-width: 1280px; /* taille max pour éviter trop grand */
}

.video-popup video {
  width: 100%;
  height: auto;
  max-height: 80vh; /* 80% de la hauteur de la fenêtre */
  border-radius: 8px;
  display: block;
}

/* Bouton de fermeture */
.close-btn {
  position: absolute;
  top: -40px;
  right: -40px;
  font-size: 40px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #DA2020;
}

/* Conteneur général : on centre et limite la largeur */
.progress-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  max-width: 1200px;  /* ✅ limite la largeur totale */
  margin: 40px auto;
  margin-bottom: 100px;
}

/* Colonne gauche */
.progress-title-left {
  width: 300px;
  font-size: 24px;
  font-weight: bold;
  color: #283897;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

/* Colonne droite */
.progress-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Chaque bloc */
.progress-block p {
  font-size: 16px;
  margin-bottom: 6px;
}

/* Barres */
.progress-wrapper {
  position: relative;
  height: 14px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background-color: #e7e9f7;
  position: relative;
}

.progress-fill {
  height: 6px;
  background-color: #283897;
  transition: width 1.5s ease;
}

.objective {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  color: #DA2020;
  font-size: 14px;
  font-weight: bold;
}

.objective-dot {
  position: absolute;
  top: 20%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: #DA2020;
  border-radius: 50%;
}

/* Réduction de la hauteur des blocs de témoignages */
.reduced-block {
  max-width: 500px;
  height: auto;
  box-shadow: 0 4px 4px rgba(0,0,0,0.25);
  border-radius: 0 0 20px 0;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.reduced-block img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

/* Style du bouton Read the story (reprend le style cta-secondary) */

.cta-secondary:hover {
  background-color: #eae9e9;
}

.cta-arrow {
  margin-left: 8px;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 12px 12px 0 0;
  display: block;
  margin: 0; /* ajoute pour forcer l’alignement */
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* important pour que l’alignement fonctionne */
  padding: 0;
}

.card .cta-secondary {
  margin: 20px auto 30px auto; /* centré horizontalement + espace haut/bas */
}

/* === NOUVELLE GRILLE D'INTERVIEWS === */
.card-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 60px;
  max-width: 1920px;
  margin: 60px auto;
  padding: 0 40px;
}

.card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  max-width: 500px; /* si tu veux limiter un peu la taille */
  height: 600px; /* Hauteur maximale définie */
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border-radius: 0 0 20px 0;
  overflow: hidden;
  background: white;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 360px; /* augmente la hauteur de l'image */
  object-fit: cover;
  object-position: center; /* centre le rognage */
  display: block;
  border-radius:0;
}

.card h2 {
  font-size: 28px;
  text-align: center;
  margin: 20px 20px 10px;
  background: linear-gradient(to right, #283897, #425CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card p {
  font-size: 20px;
  text-align: center;
  padding: 0 20px;
  flex-grow: 1;
  color: #1a1a1a;
  margin: 5px 0;
}

.card .cta-secondary {
  margin: 20px auto 30px auto;
}

.popup-story {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: white;
  max-width: 800px;
  width: 90%;
  padding: 40px;
  border-radius: 20px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Vidéos dans les popups (pas rognées) */
.popup-content video {
  width: 100%;
  height: auto;          /* garde le ratio */
  max-height: 70vh;      /* tient dans l'écran */
  object-fit: contain;   /* aucune partie rognée */
  display: block;
  background: #000;      /* bandes noires si besoin */
  border-radius: 10px;
}

.popup-content h2.gradient-title {
  font-size: 40px;
  font-weight: bold;
  background: linear-gradient(to right, #283897, #425CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 30px; /* espace sous le titre */
}

.popup-content p {
  font-size: 22px;
  line-height: 1.6;
  color: #1a1a1a;
  margin-bottom: 20px; /* espace entre paragraphes et vidéo */
}

.popup-content img.popup-image {
  width: 100%;
  height: auto;
  max-height: 70vh; /* évite que l'image dépasse l'écran */
  object-fit: contain; /* garde le ratio sans rognage */
  display: block;
  border-radius: 10px;
  margin-top: 20px; /* espace entre le texte et l'image */
  margin-bottom: 20px;
}

.popup-content .key-figures {
  display: flex;
  justify-content: space-around; /* ou space-between */
  align-items: center;
  flex-wrap: nowrap; /* empêche le passage à la ligne */
  gap: 40px; /* espace entre les items */
  background-color: #E7E9F7; /* fond bleu clair */
  padding: 20px;
}

.popup-content .key-figure-item h4.h4-gradient {
  font-size: 50px; /* Taille réduite */
}

.popup-content .key-figure-item p {
  font-size: 22px; /* Taille réduite */
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  font-weight: bold;
  color: #DA2020;
  cursor: pointer;
}

/* === Bouton HOME === */
.home-button {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;

  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;

  display: flex;
  justify-content: center;
  align-items: center;

  border: 2px solid #283897;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;

  padding: 12px;   /* espace intérieur */
}

.home-button:hover {
  background: #f5f5f5;
  transform: translateX(-50%) translateY(-4px);
}

.home-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ===============================
   PORTRAIT 43" (1080x1920) – FIX
   =============================== */
@media screen and (orientation: portrait) and (min-width: 1080px) and (max-height: 1920px) {

  /* Sécurité overflow & base */
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* BANNIÈRE : moins haute et toujours derrière la carte qui chevauche */
  .banner-component {
    position: relative;   /* pour permettre z-index */
    z-index: 0;           /* derrière */
    height: 560px;        /* 840px -> 560px */
    max-width: 100vw;     /* pas plus large que l’écran */
    background-position: center;
    background-size: cover;
  }

  /* INTRO (carte blanche qui chevauche la bannière) */
  .intro-component {
    width: 94vw;                /* 1766px -> fluide */
    margin: -220px auto 40px;   /* -350px trop violent en portrait */
    border-radius: 0 0 16px 0;
    position: relative;         /* pour activer z-index */
    z-index: 2;                 /* au-dessus de la bannière */
  }
  .intro-text {
    padding: 36px;              /* 60px -> 36px */
  }
  .intro-text h2 {
    font-size: 32px;            /* 40 -> 32 */
    margin-bottom: 12px;
  }
  .intro-text p {
    font-size: 22px;            /* 30 -> 22 */
    line-height: 1.5;
  }
  .intro-image {
    width: 46%;
  }

  /* H3 & paragraphes centraux */
  .h3-gradient {
    font-size: 44px;            /* 65 -> 44 */
    margin: 50px 0 30px;
  }
  .text-block-centered {
    font-size: 22px;            /* 30 -> 22 */
    max-width: 92vw;
    padding: 0 12px;
  }

  /* VIDÉO */
  .video-container {
    margin: 36px auto;
  }
  .video-container video {
    width: 94vw;                /* 80% -> plein cadre portrait */
    max-width: 94vw;
  }

  /* CHIFFRES CLÉS */
  .key-figures {
    gap: 120px;                 /* 350 -> 120 */
    height: auto;               /* 250px -> auto */
    padding: 20px 0;
    margin: 40px auto;
    max-width: 100vw;
  }
  .h4-gradient { font-size: 48px; }    /* 70 -> 48 */
  .key-figure-item p { font-size: 24px; } /* 40 -> 24 */

  /* BLOCS SERVICES (Who we are) : en colonne, auto-height */
  .dual-blocks {
    flex-direction: column;
    align-items: center;
    gap: 32px;                  /* 80 -> 32 */
    margin: 40px auto;
    padding: 0 20px;
    max-width: 100vw;
  }
  .content-block {
    width: 94vw;                /* 711px -> fluide */
    height: auto;               /* 1002px -> auto */
    border-radius: 0 0 16px 0;
  }
  .content-block img {
    width: 100%;
    height: 300px;              /* 417 -> 300 */
    object-fit: cover;
    margin-bottom: 16px;        /* 30 -> 16 */
  }
  .content-block h2 {
    font-size: 28px;            /* 40 -> 28 */
    margin-bottom: 10px;
    padding: 0 20px;            /* 30 -> 20 */
  }
  .content-block p {
    font-size: 20px;            /* 30 -> 20 */
    line-height: 1.5;
    padding: 0 16px;            /* 30 -> 16 */
    margin-bottom: 16px;
  }

  /* CARDS (What we do / Working at) */
  .card-container {
    gap: 32px; 
    margin: 40px auto;
    padding: 0 20px;
    max-width: 100vw;
    align-items: stretch;
  }
  .card {
    max-width: 520px;
    height: auto;               /* 600 -> auto */
  }
  .card img {
    height: 300px;              /* 360 -> 300 */
    object-fit: cover;
  }
  .card h2 { font-size: 22px; }
  .card p  { font-size: 18px; }

  /* BANNIÈRE FONDATEUR */
  .founder-banner {
    height: 560px;              /* 840 -> 560 */
    max-width: 100vw;
  }
  .founder-text {
    padding: 40px 48px;         /* 60/80 -> 40/48 */
  }
  .founder-text h2 { font-size: 36px; } /* 48 -> 36 */
  .founder-text p  { font-size: 18px; } /* 20 -> 18 */

  /* HOME BUTTON : reste centré en bas en portrait 43" */
  .home-button {
    bottom: 24px;
    left: 50%;
    right: auto;
    top: auto;
    transform: translateX(-50%);
  }
}
