/* Reset CSS et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    transition: background-color 0.8s ease;
}

/* Container principal qui occupe toute la page */
.fullpage-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header minimaliste */
header {
    padding: 30px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.5s ease;
}

.menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
}

/* Slider qui prend toute la page */
.fullpage-slider {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Chaque option du slider occupe 50% de l'écran */
.option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.option-content {
    z-index: 2;
    text-align: center;
    padding: 30px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(20px);
}

.option h2 {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.option p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 400px;
    text-align: center;
}

.btn-about {
    padding: 15px 40px;
    border: 2px solid;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.4s ease;
    display: inline-block;
    font-size: 1.1rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-about:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.btn {
    padding: 15px 40px;
    background-color: transparent;
    border: 2px solid;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.4s ease;
    display: inline-block;
    font-size: 1.1rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

/* Overlay pour l'effet de profondeur */
.option-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
    opacity: 0.7;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.option:hover .option-overlay {
    opacity: 0.5;
}

/* Icônes représentatives */
.option-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    transition: transform 0.5s ease;
}

.option:hover .option-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Footer */
footer {
    padding: 20px;
    text-align: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 10;
    color: rgba(255, 255, 255, 0.7);
}

/* Animation d'entrée */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.option-content {
    animation: fadeIn 1s ease forwards;
}

.developer-option .option-content {
    animation-delay: 0.3s;
}

.creative-option .option-content {
    animation-delay: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .fullpage-slider {
        flex-direction: column;
    }
    
    .option h2 {
        font-size: 2.5rem;
    }
}

/* MASQUAGE DU CONTENU - CORRIGÉ */

.fullpage-slider:hover .option:not(:hover) .option-content p,
.fullpage-slider:hover .option:not(:hover) .option-content .btn {
    opacity: 0 !important;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;

}

.fullpage-slider:hover .option:not(:hover) .option-content .option-icon,
.fullpage-slider:hover .option:not(:hover) .option-content h2 {
    font-size: 30px;
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(0.8);
    margin-bottom: 0px;
}

.option:hover .option-content {
    opacity: 1 !important;
    visibility: visible;
    transform: translateY(0);
}

.option:hover .option-content .option-icon {
    transform: scale(1.2) rotate(5deg);
    margin-bottom: 20px;
}

/* Répartition 80/20 au survol */
.option:hover {
    flex: 4; /* 80% de l'espace */
}

.option:not(:hover) {
    flex: 1; /* 20% de l'espace */
}

/* Transition plus douce pour le changement de flex */
.option {
    transition: flex 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Assurer que le logo reste toujours visible */
header {
    z-index: 100;
}

/* Images de fond pour chaque option */
.developer-option {
    background: linear-gradient(rgba(22, 33, 62, 0.7), rgba(15, 52, 96, 0.7)), url('../sources/dev-mode-back.jpg') center/cover no-repeat !important;
}

.creative-option {
    background: linear-gradient(rgba(150, 64, 53, 0.7), rgba(134, 75, 60, 0.7)), url('../sources/creatif-mode-back.jpg') center/cover no-repeat !important;
}

/* Ajustements pour mieux voir le contenu sur l'image de fond */
.option-content {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn {
    backdrop-filter: blur(5px);
    background-color: rgba(255, 255, 255, 0.1) !important;
}
/* ===== MOBILE: plein écran sans scroll, contenu compact ===== */
@media (max-width: 900px){
  /* 1) Pas de scroll, 100% écran mobile fiable (svh/dvh fallback) */
  html, body{
    height: 100svh;              /* unités “small viewport” fiables sur mobile */
    height: 100dvh;              /* fallback moderne */
    height: -webkit-fill-available; /* iOS */
    overflow: hidden;            /* interdit le scroll */
  }

  /* 2) Conteneurs plein écran strict */
  .fullpage-container{
    height: 100%;
    min-height: 100%;
  }

  .fullpage-slider{
    height: 100%;
    min-height: 100%;
    display: grid;               /* évite la colonne qui dépasse */
    grid-template-rows: 1fr;     /* une seule “diapo” visible */
  }

  /* 3) Une seule option visible (au choix : la première) */
  .option{
    flex: none;
    height: 100%;
    min-height: 100%;
    overflow: hidden;            /* cache ce qui dépasse */
    transition: none;
  }
  /* si tu veux toujours montrer la moitié Dev + moitié Créa, enlève ce bloc
     et remets .fullpage-slider en flex + .option{flex:1} — mais on perdra
     l’absence de scroll si les contenus sont trop grands. */

  /* 4) Réduction des tailles (typo + espacements) pour tout faire tenir */
  header{
    position: absolute; top: 0; left: 0; right: 0;
    padding: 14px 16px;          /* ↓ header plus compact */
    z-index: 10;
  }
  .logo{ font-size: clamp(1.1rem, 4vw, 1.4rem); }
  .menu-toggle{ font-size: clamp(1rem, 4vw, 1.2rem); }

  .option-content{
    padding: 16px;               /* ↓ marges internes */
    transform: none;
    max-width: min(92vw, 520px); /* limite la largeur */
    margin: 0 auto;
  }

  .option-icon{
    font-size: clamp(1.6rem, 8vw, 2.2rem);
    margin-bottom: 10px;
  }

  .option h2{
    /* grosse mais adaptable, et plus courte en hauteur */
    font-size: clamp(1.4rem, 7.5vw, 2.2rem);
    line-height: 1.15;
    letter-spacing: 2px;
    margin-bottom: 10px;
  }

  .option p{
    font-size: clamp(.9rem, 3.6vw, 1.05rem);
    line-height: 1.35;
    margin-bottom: 14px;
    max-width: 80ch;             /* évite les lignes trop longues */
  }

  .btn{
    font-size: clamp(.85rem, 3.6vw, 1rem);
    padding: 10px 18px;          /* ↓ hauteur bouton */
    border-width: 2px;
    border-radius: 22px;
    backdrop-filter: blur(3px);
  }

  /* 5) Overlay un peu plus léger pour la lisibilité mais pas trop */
  .option-overlay{ opacity: .55; }

  .fullpage-slider:hover .option:not(:hover) .option-content p,
  .fullpage-slider:hover .option:not(:hover) .option-content .btn,
  .fullpage-slider:hover .option:not(:hover) .option-content h2,
  .fullpage-slider:hover .option:not(:hover) .option-content .option-icon{
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    font-size: inherit !important;
    margin-bottom: initial !important;
  }
  .option:hover, .option:not(:hover){ flex: initial; }

  /* 7) Footer fixe mais compact (et sans chevaucher le contenu) */
  footer{
    position: absolute;
    bottom: 8px; left: 0; right: 0;
    padding: 8px 12px;
    font-size: clamp(.8rem, 3.2vw, .9rem);
    pointer-events: none; /* clique passe au contenu si nécessaire */
  }
}

/* Option: si ton texte dépasse encore sur certains téléphones très petits,
   tu peux forcer un “zoom” global du contenu pour qu’il tienne: */
@media (max-width: 380px){
  .option-content{ transform: scale(.92); transform-origin: top center; }
}
/* ===== MOBILE: 2 moitiés fixes dans un écran, sans scroll ===== */
@media (max-width: 900px){
  /* l’écran est fixe, pas de scroll */
  html, body{
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
  }

  /* le slider occupe 100% de l’écran */
  .fullpage-slider{
    display: flex;
    flex-direction: column;  /* DEV au-dessus, CRÉA en dessous */
    width: 100%;
    height: 100%;
    padding: 0;              /* IMPORTANT: pas de padding qui “pousse” */
  }

  /* chaque option = 50% de la hauteur de l’écran */
  .option{
    flex: 0 0 50%;
    height: 50%;
    min-height: 0;           /* neutralise 100svh antérieurs */
    transition: none;        /* pas d’effet 80/20 au tactile */
  }

  /* lisibilité identique */
  .option-content{ transform:none; }
  .option-overlay{ opacity:.6; }

  /* désactive tout masquage “au hover” (inutile en tactile) */
  .fullpage-slider:hover .option:not(:hover) .option-content p,
  .fullpage-slider:hover .option:not(:hover) .option-content .btn,
  .fullpage-slider:hover .option:not(:hover) .option-content h2,
  .fullpage-slider:hover .option:not(:hover) .option-content .option-icon{
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
    font-size:inherit !important;
    margin-bottom:initial !important;
  }

  /* header/footer: pas de chevauchement */
  header{ position:absolute; top:0; left:0; right:0; }
  footer{ position:absolute; bottom:0; left:0; right:0; }
}
/* Centrage vertical parfait */
.option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* centre h2 + p + bouton en bloc */
  gap: 14px;               /* espace homogène entre les éléments */
  transform: none;         /* enlève le translateY(20px) qui faussait le centrage */
  height: 100%;            /* prend toute la hauteur dispo dans .option */
}

/* Ajustements typographiques */
.option h2 {
  margin: 0;               /* on enlève margin-bottom */
  font-size: 4rem;
}

.option p {
  margin: 0;               /* enlève le margin-bottom */
  font-size: 1.2rem;
  max-width: 400px;
}
/* ====== MOBILE TYPO (iPhone 12 ~ 390px) ====== */
@media (max-width: 900px){
  .option-content{
    gap: 10px;
    padding: 12px 16px;
  }

  .option h2{
    /* taille fluide + meilleure compacité + wrap forcé des mots longs */
    font-size: clamp(1.4rem, 9.5vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: 2px;
    word-break: break-word; /* “DÉVELOPPEUR” peut passer à la ligne */
    hyphens: auto;
    margin: 0;
  }

  .option p{
    font-size: clamp(.9rem, 3.8vw, 1.05rem);
    line-height: 1.35;
    margin: 0;
    max-width: 80vw;   /* évite les lignes trop longues */
  }

  .btn, .btn-about{
    font-size: clamp(.8rem, 3.4vw, .95rem);
    padding: 10px 16px;
    border-width: 2px;
    border-radius: 22px;
  }
  header {
    padding: 8px 12px;
  }
  header .logo {
    font-size: 0.85rem;
  }
  .btn-about {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
}

/* ——— Très petites largeurs: si ça serre, on cache la tagline ——— */
@media (max-width: 360px){
  header .logo:last-of-type{ display:none; }
}

/* ---- Switch langue (fixé en bas à droite) ---- */
.lang-switch{
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  right:  max(16px, env(safe-area-inset-right));
  z-index: 2000;
}

/* on cache la checkbox native */
.lang-switch input{ position:absolute; opacity:0; pointer-events:none; }

.lang-switch label{
  --h: 36px;
  --pad: 4px;
  --thumb: calc(var(--h) - var(--pad)*2);

  /* FIX 1: pas de "pad" au milieu -> 2×thumb + 2×pad (gauche/droite) */
  width: calc(var(--thumb)*2 + var(--pad)*2);
  height: var(--h);
  padding: var(--pad);

  /* FIX 2: chaque moitié = largeur de la pastille */
  display: grid;
  grid-template-columns: var(--thumb) var(--thumb);
  align-items: center;
  justify-items: center;

  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .2px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  position: relative;
  user-select: none;
}

/* Pastille */
.lang-switch label::after{
  content:"";
  position:absolute;
  top: var(--pad);
  left: var(--pad);
  width:  var(--thumb);
  height: var(--thumb);
  border-radius: 999px;
  background: #4cc9f0;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
  z-index: 0;
}

/* Quand EN est actif (checkbox cochée), on décale la pastille
   de sa largeur + l’espace central (= var(--pad)) */
.lang-switch input:checked + label::after{
  transform: translateX(var(--thumb));
}

/* Texte parfaitement centré dans chaque moitié */
.lang-switch .lang-fr,
.lang-switch .lang-en{
  line-height: 1;
  text-align: center;
  z-index: 1;
}

/* Focus accessible */
.lang-switch label:focus-within{
  box-shadow: 0 0 0 3px rgba(76,201,240,.35);
  outline: none;
}

/* plus compact sur petits écrans */
@media (max-width: 480px){
  .lang-switch label{ --h: 32px; --pad: 3px; font-size: .8rem; }
}
