/* =========================
BASE
========================= */
html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:#7fbfc0;
  transition:background 0.6s ease;
  line-height:1.5;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.04) 0%, transparent 60%);
  mix-blend-mode:overlay;
}

.page{
  max-width:1100px;
  margin:auto;
  padding:20px;
}

/* Lorsque le menu est visible */
.with-header .page{
  margin-top:90px;
}

/* Lorsque le menu est masqué (?masque=2) */
.no-header .page{
  margin-top:20px;
}

/* =========================
SEO
========================= */
.seo{
  background:white;
  padding:16px;
  border-radius:12px;
  margin-bottom:15px;
}

#title{
  color:#22a5e5;
  font-weight:700;
}

/* =========================
VIDEO
========================= */
#ytLayer{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  background:#000;
  border-radius:16px;
  overflow:hidden;
}

#player{
  position:absolute;
  inset:0;
}

#videoOverlay{
  position:absolute;
  inset:0;
  z-index:5;
}

/* =========================
CARTOUCHES
========================= */
.quick{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin-top:10px;
}

.item{
  background:white;
  border-radius:10px;
  padding:8px;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.label{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:13px;
  font-weight:600;
  color:#3f6f73;
  white-space:nowrap;
}

.value{
  font-size:13px;
  color:#1f4f53;
  font-weight:500;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex:1;
}

.icon{
  width:24px;
  height:24px;
  object-fit:contain;
}

/* =========================
TEXTE
========================= */
#texte{
  display:block;
  flex:1;
  overflow-y:auto;
  padding:20px;
  min-width:0;
}

#texte > *{
  min-width:0;
}

#texte h2,
#texte p{
  max-width:100%;
  word-break:break-word;
}

#texte::-webkit-scrollbar{
  width:8px;
}

#texte::-webkit-scrollbar-thumb{
  background:#3f6f73;
  border-radius:4px;
}

#texte h2{
  color:#2f7f84;
  margin:12px 0 6px;
  font-size:18px;
  font-weight:700;
}

.texte-wrapper{
  display:grid;
  grid-template-columns:1fr 1fr;
  background:white;
  border-radius:12px;
  margin-top:20px;
  height:320px;
}

/* =========================
COLONNES
========================= */
.col-left{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  border-right:1px solid #d0e5e7;
  overflow:hidden;
}

.col-right{
  display:flex;
  flex-direction:column;
  height:100%;
  min-width:0;
  overflow:hidden;
}

/* =========================
COLONNE GAUCHE
========================= */
.left-content{
  width:100%;
  max-width:300px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.left-content div{
  background:#f5fbfb;
  border-radius:12px;
  padding:16px;
  text-align:center;
  box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.left-content h3{
  margin:0 0 8px;
  color:#2f7f84;
  font-size:16px;
  font-weight:700;
}

.left-content p{
  margin:0;
  font-size:15px;
  color:#1f4f53;
  line-height:1.4;
}

.left-content div:first-child{
  background:#fff6f6;
  border:1px solid #ffd6d6;
}

/* =========================
CONTROLS
========================= */
.controls{
  margin-top:10px;
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}

.controls.levels{
  justify-content:flex-start;
}

.controls button{
  padding:10px 14px;
  border:none;
  border-radius:8px;
  background:#3f6f73;
  color:white;
  cursor:pointer;
}

.controls.inside{
  flex-shrink:0;
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 20px 15px;
  border-top:1px solid #d0e5e7;
}

.controls.inside button{
  display:flex;
  align-items:center;
  gap:6px;
  padding:10px 14px;
  border:none;
  border-radius:10px;
  background:#2f7f84;
  color:white;
  font-weight:600;
  cursor:pointer;
  transition:0.2s;
}

.controls.inside button:hover{
  background:#00aa88;
  color:#00363d;
}

.levels button.active{
  background:#00aa88;
  color:#00363d;
}

/* =========================
QUIZ + PREMIUM
========================= */
.quiz-wrap{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:20px;
}

.quiz{
  background:white;
  padding:15px;
  border-radius:12px;
  text-align:center;
}

.quiz h3{
  margin:0 0 8px;
  font-size:16px;
}

.quiz-question{
  font-size:14px;
  margin-bottom:10px;
  color:#1f4f53;
}

.quiz-options{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}

.quiz button{
  padding:10px 14px;
  border:none;
  border-radius:8px;
  background:#3f6f73;
  color:white;
  cursor:pointer;
}

/* =========================
PREMIUM
========================= */
.premium{
  background:white;
  padding:18px;
  border-radius:14px;
  border:2px solid #40b0bf;
  box-shadow:0 6px 18px rgba(0,0,0,0.15);
  position:relative;
  transition:transform 0.2s ease;
}

.premium:hover{
  transform:translateY(-2px);
}

.premium::before{
  content:"Premium";
  position:absolute;
  top:0;
  right:0;
  background:#40b0bf;
  color:white;
  font-size:12px;
  font-weight:700;
  padding:6px 10px;
  border-bottom-left-radius:10px;
}

.premium h3{
  margin:0 0 8px;
}
.amiganseau-premium{
  color:#00aa88;
}
.premium p{
  font-size:14px;
  color:#1f4f53;
}

.premium-btn{
  margin-top:10px;
  padding:10px;
  width:100%;
  border:none;
  border-radius:8px;
  background:#00aa88;
  color:white;
  font-weight:600;
  cursor:pointer;
}

/* =========================
NAVIGATION
========================= */
.nav-buttons{
  display:grid;
  grid-template-columns:repeat(3,260px);
  justify-content:center;
  gap:16px;
  margin-top:25px;
  background:rgba(255,255,255,0.9);
  backdrop-filter:blur(6px);
  padding:20px;
  border-radius:16px;
  box-shadow:0 6px 20px rgba(0,0,0,0.15);
}

.big-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  font-size:18px;
  font-weight:700;
  text-decoration:none;
  border-radius:12px;
  background:#1f6f8b;
  color:white;
  transition:0.2s;
}

.big-btn:hover{
  background:#00aa88;
  color:#00363d;
  transform:translateY(-2px);
}

/* =========================
IMAGES
========================= */
img{
  max-width:100%;
  height:auto;
}

/* =========================
TABLETTES
========================= */
@media (max-width:1024px){
  .page{
    max-width:900px;
  }

  .quick{
    grid-template-columns:repeat(2,1fr);
  }

  .quiz-wrap{
    grid-template-columns:1fr;
  }

  .nav-buttons{
    grid-template-columns:repeat(2,1fr);
  }

  .texte-wrapper{
    grid-template-columns:1fr;
    height:auto;
  }

  .col-left{
    border-right:none;
    border-bottom:1px solid #d0e5e7;
  }
}

/* =========================
SMARTPHONES
========================= */
@media (max-width:800px){
  .quick{
    grid-template-columns:1fr 1fr;
  }

  .controls.levels{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:8px;
  }

  .nav-buttons{
    grid-template-columns:1fr;
  }
}

/* =========================
PETITS SMARTPHONES
========================= */
@media (max-width:600px){
  body{
    font-size:15px;
  }

  #title{
    font-size:22px;
    text-align:center;
  }

  .seo{
    padding:14px;
  }

  .quick{
    grid-template-columns:1fr;
  }

@media (max-width:600px){
  .controls.inside{
    flex-direction:row;
    justify-content:space-between;
    gap:8px;
  }

  .controls.inside button{
    flex:1;
    width:auto;
    padding:8px 10px;
    font-size:14px;
    white-space:nowrap;
  }
}
  .big-btn{
    width:100%;
    font-size:16px;
    padding:16px;
  }

  .left-content{
    max-width:100%;
  }
}

/* =========================
APPAREILS TACTILES
========================= */
@media (hover:none){
  .big-btn:hover,
  .controls button:hover,
  .premium:hover{
    transform:none;
  }
}

/* =========================
SAFE AREA IOS
========================= */
@supports(padding:env(safe-area-inset-left)){
  body{
    padding-left:env(safe-area-inset-left);
    padding-right:env(safe-area-inset-right);
    padding-bottom:env(safe-area-inset-bottom);
  }
}