/* ==========================================================================
   RAHIK & FAMILY - DESIGN SYSTEM & THEME VARIABLES
   ========================================================================== */

:root {
  /* --- COULEURS PRINCIPALES --- */
  --pink: #C73E6E;
  --pink-dark: #A82E58;
  --pink-light: #E85B8B;

  --blue: #4AA8D8;
  --blue-light: #7BC4E8;

  --green: #7BC043;
  --green-dark: #5FA030;

  --orange: #F4A261;
  --orange-dark: #E8894A;
  --yellow: #FFD93D;
  --purple: #9B59B6;

  /* --- COULEURS NEUTRES & FONDS --- */
  --white: #FFFFFF;
  --bg-light: #F8F9FF;
  --text-dark: #2D2D3F;
  --text-muted: #666666;
  --border-light: #EEEEEE;

  /* --- TYPOGRAPHIE --- */
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Fredoka', 'Nunito', sans-serif;

  /* --- TAILLES ET SCALES --- */
  --btn-radius: 30px;
  --btn-scale: 1;
  --heading-scale: 1;

  /* --- LARGEUR DE PAGE COMMUNE (alignement de toutes les sections) --- */
  --page-width: 1400px;
}

/* ==========================================================================
   RESET & BASES
   ========================================================================== */

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  overflow-x: hidden;
  background: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
}

/* ==========================================================================
   COMPOSANTS REUTILISABLES (BOUTONS, TITRES, ANIMATIONS)
   ========================================================================== */

.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: calc(3rem * var(--heading-scale));
  color: var(--blue);
  margin-bottom: 50px;
}

/* Bouton principal (orange) */
.btn-install {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
  padding: calc(15px * var(--btn-scale)) calc(35px * var(--btn-scale));
  border-radius: var(--btn-radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: calc(1rem * var(--btn-scale));
  cursor: pointer;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(244,162,97,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-install .download-icon {
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bouton vert (téléchargement / action positive) */
.btn-download {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: white;
  border: none;
  padding: calc(12px * var(--btn-scale)) calc(30px * var(--btn-scale));
  border-radius: var(--btn-radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: calc(0.95rem * var(--btn-scale));
  cursor: pointer;
  margin-top: 15px;
  box-shadow: 0 6px 15px rgba(123,192,67,0.4);
}

.btn-download-big {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: white;
  border: none;
  padding: calc(18px * var(--btn-scale)) calc(40px * var(--btn-scale));
  border-radius: var(--btn-radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: calc(1.1rem * var(--btn-scale));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* ==========================================================================
   HEADER & NAVBAR — EXACTEMENT COMME L'IMAGE MAQUETTE
   - Logo marqué à gauche
   - Pilules menu au centre
   - Réseaux sociaux regroupés à droite
   ========================================================================== */

/* ==========================================================================
   CALQUE DE DÉBORDEMENT GLOBAL
   - Enfant direct de <body> → contexte d'empilement racine, AU-DESSUS de la navbar
   - pointer-events: none → laisse passer les clics vers le reste du site
   - L'image elle-même repassée en pointer-events: auto → reste CLIQUABLE
   ========================================================================== */
#overflow-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;            /* les enfants débordent (overflow: visible) */
  z-index: 99999;       /* > navbar (1002) → image visible par-dessus la navbar */
  pointer-events: none; /* ne bloque pas la navigation / les boutons en dessous */
  overflow: visible;
}

/* Image en mode débordement — reparentée dans #overflow-layer (position: absolute
   relative au calque = coordonnées DOCUMENT, donc l'image SCROLLE avec la page) */
#overflow-layer .img-overflow {
  position: absolute !important;
  z-index: 99999 !important;
  overflow: visible !important;
  pointer-events: auto !important; /* CLIQUABLE malgré le calque non-interactif */
  cursor: grab !important;
}

.img-overflow:active {
  cursor: grabbing !important;
}

/* Sections parents — crée un stacking context assez haut pour déborder au-dessus de la navbar */
.hero,
.meet-family,
.subjects-section,
.tips-section,
.app-showcase,
footer {
  position: relative;
  z-index: 1001; /* au-dessus de la navbar (1000) */
}

/* Navbar — reste toujours au-dessus du contenu de base mais sous les images débordantes */
.navbar {
  z-index: 1002 !important;
}

/* Navbar */
.navbar {
  background: var(--pink);
  padding: 14px 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 6px 25px rgba(199,62,110,0.35);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--page-width);
  margin: 0 auto;
  width: 100%;
}

/* --- LOGO MARQUE (Gauche) --- */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 7px 16px 7px 8px;
  text-decoration: none;
  color: white;
  transition: all 0.3s;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12);
}

.nav-brand:hover {
  background: rgba(255,255,255,0.25);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #FFD93D, #F4A261);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 1.5px;
}

.brand-sub {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.55rem;
  letter-spacing: 2px;
  opacity: 0.75;
  margin-top: 1px;
}

/* --- PILULES MENU CENTRAL --- */
.nav-menu-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: auto;
}

.nav-pill {
  background: #9E2A50;
  border-radius: 50px;
  padding: 10px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

.nav-pill:hover {
  background: #B03060;
  transform: translateY(-2px);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2), 0 6px 18px rgba(0,0,0,0.2);
}

.nav-pill.active {
  background: #FFFFFF !important;
  color: var(--pink) !important;
  box-shadow: 0 6px 22px rgba(0,0,0,0.22) !important;
  transform: scale(1.03);
  border-color: transparent;
}

/* --- GROUPE RÉSEAUX SOCIAUX (Droite) --- */
.nav-social-group {
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12);
}

.nav-social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 1.05rem;
  transition: all 0.25s;
}

.nav-social-icon:hover {
  background: white;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ==========================================================================
   SECTIONS DU SITE
   ========================================================================== */

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  padding: 60px 5% 80px;
  min-height: 100vh;            /* prend toute la hauteur de l'écran */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: var(--page-width);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Empêche les colonnes de déborder à cause de l'image large */
.hero-content > * {
  min-width: 0;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: calc(5rem * var(--heading-scale));
  color: white;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -2px;
}

.hero-text p {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
}

.hero-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all 0.3s;
}

.hero-dots span.active {
  background: white;
  width: 30px;
  border-radius: 6px;
}

/* ===== HERO SLIDER (texte + image rotatifs) ===== */
.hero-slides {
  position: relative;
  width: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
  z-index: 1;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 2;
}

.hero-image {
  display: flex;
  justify-content: flex-start;       /* image calée vers la gauche de sa colonne */
  align-items: center;
  position: relative;
  min-width: 0;
}

.hero-slide-img {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(0, -50%) scale(0.92);
  max-width: 100%;
  height: auto;
  max-height: 460px;
  opacity: 0;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
  transition: opacity 0.7s ease, transform 0.7s ease;
  z-index: 1;
  animation: none;
}

.hero-slide-img.active {
  position: relative;
  margin-left: -45px;                /* décalage vers la gauche (margin non écrasé par l'anim) */
  opacity: 1;
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}

/* En mode édition on empile proprement pour garder le clic sur chaque slide */
body.edit-mode .hero-slide {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  margin-bottom: 30px;
}

body.edit-mode .hero-image {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

body.edit-mode .hero-slide-img {
  position: relative;
  top: auto;          /* annule le décalage absolu hérité (top:50%/left:0) */
  left: auto;
  transform: none;
  opacity: 1;
  animation: none;
  margin-bottom: 0;
}

.hero-banner {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--page-width);
  margin: 40px auto 0;
  position: relative;
  z-index: 2;
  border: 2px solid rgba(255,255,255,0.2);
}

.hero-banner-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.hero-banner-text h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.hero-banner-text p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  margin: 0;
}

/* Meet Family Section */
.meet-family {
  padding: 80px 5%;
  background: var(--bg-light);
  text-align: center;
}

/* Contenu des cartes de la galerie coverflow (le layout 3D est défini plus bas,
   dans la section « GALERIE COVERFLOW FAMILLE ») */
.coverflow-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;          /* personnages calés vers le HAUT de la carte */
  justify-content: center;
  padding: 12px 20px 64px;          /* zone basse réservée au titre */
}

.coverflow-art img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(30, 20, 0, .22));
}

.coverflow-dim {
  position: absolute;
  inset: 0;
  background: #10131c;
  opacity: .4;                 /* piloté en JS : 0 sur la carte active */
  transition: opacity .6s ease;
  pointer-events: none;
}

.coverflow-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(16, 19, 28, .72));
  pointer-events: none;
}

.coverflow-title {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease .1s, transform .45s cubic-bezier(.22, 1, .36, 1) .1s;
  pointer-events: none;
}

.coverflow-title strong {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: -.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.coverflow-title small {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: .88;
}

.coverflow-card.is-active .coverflow-title {
  opacity: 1;
  transform: none;
}

/* Subjects Section */
.subjects-section {
  padding: 80px 5%;
  background: var(--bg-light);
  text-align: center;
}

.subjects-grid {
  max-width: var(--page-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.subject-card {
  background: white;
  border-radius: 25px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  transition: all 0.4s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--pink), var(--orange));
}

.subject-card:nth-child(2)::before { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.subject-card:nth-child(3)::before { background: linear-gradient(90deg, var(--green), var(--green-dark)); }
.subject-card:nth-child(4)::before { background: linear-gradient(90deg, var(--orange), var(--yellow)); }
.subject-card:nth-child(5)::before { background: linear-gradient(90deg, #9B59B6, #C39BD3); }
.subject-card:nth-child(6)::before { background: linear-gradient(90deg, #E74C3C, #F1948A); }
.subject-card:nth-child(7)::before { background: linear-gradient(90deg, #1ABC9C, #76D7C4); }
.subject-card:nth-child(8)::before { background: linear-gradient(90deg, #34495E, #7F8C8D); }

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

.subject-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 15px;
}

.subject-card h3 {
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.subject-card .subject-name {
  color: var(--pink);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.subject-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.subject-card .card-btn {
  background: var(--pink);
  color: white;
  border: none;
  padding: calc(10px * var(--btn-scale)) calc(25px * var(--btn-scale));
  border-radius: var(--btn-radius);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  font-size: calc(0.9rem * var(--btn-scale));
}

/* Tips Section */
.tips-section {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  padding: 80px 5%;
}

.tips-header {
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: var(--page-width);
  margin: 0 auto 40px;
}

.tips-icon {
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.3);
}

.tips-header h2 {
  color: white;
  font-size: calc(3rem * var(--heading-scale));
  line-height: 1.1;
}

.tips-content {
  max-width: var(--page-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}

.tips-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tips-menu-item {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tips-menu-item:hover, .tips-menu-item.active {
  background: white;
  color: var(--pink);
}

.tips-video {
  background: white;
  border-radius: 25px;
  padding: 20px;
}

.video-placeholder {
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  border-radius: 15px;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.video-placeholder img {
  max-width: 70%;
  max-height: 80%;
  object-fit: contain;
}

.play-btn {
  position: absolute;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  border: 4px solid white;
}

.play-btn:hover {
  transform: scale(1.1);
}

/* Légende dynamique sous la vidéo (change selon l'onglet choisi) */
.tips-caption {
  margin-top: 16px;
  padding: 14px 20px;
  background: var(--bg-light);
  border-left: 5px solid var(--yellow);
  border-radius: 12px;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-dark);
  min-height: 74px;
}

.tips-caption strong {
  color: var(--pink);
  font-weight: 600;
}

/* App Showcase Section */
.app-showcase {
  padding: 80px 5%;
  background: white;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--page-width);
  margin: 0 auto;
}

/* Réserve la place du téléphone même si l'image charge lentement :
   évite l'effondrement de la section (aspect ratio ~9/19) */
.app-phone {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-phone img {
  max-width: 100%;
  max-height: 600px;
}

.app-info .stars {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 15px;
}

.app-info .stars span {
  color: var(--yellow);
  font-size: 1.5rem;
}

.app-info .rating {
  color: var(--green);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-left: 10px;
}

.app-info h2 {
  font-size: calc(3rem * var(--heading-scale));
  color: var(--blue);
  margin-bottom: 20px;
  line-height: 1.1;
}

.app-features {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.app-feature {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-feature-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.app-feature-text {
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  padding: 60px 5% 30px;
  color: white;
}

.footer-content {
  max-width: var(--page-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--yellow);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
}

.footer-bottom {
  max-width: var(--page-width);
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
}

/* ==========================================================================
   MODALES (PERSONNAGE & GALERIE D'IMAGES)
   ========================================================================== */

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

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 25px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: var(--pink);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
}

.modal-content h2 {
  color: var(--pink);
  margin-bottom: 10px;
  font-size: 2rem;
}

.modal-content .modal-subject {
  color: var(--blue);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.modal-content img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 0 auto 20px;
  display: block;
}

.modal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--bg-light);
}

.modal-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
}

.modal-tab.active {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
}

.lesson-item, .video-item, .game-item {
  background: var(--bg-light);
  padding: 15px 20px;
  border-radius: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
}

.lesson-icon, .video-icon, .game-icon {
  width: 40px;
  height: 40px;
  background: var(--pink);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  flex-shrink: 0;
}

.video-icon { background: var(--blue); }
.game-icon { background: var(--green); }

.item-info h4 {
  font-size: 1rem;
  margin-bottom: 3px;
}

.item-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal Image Picker Specifics */
.picker-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.picker-input-row input {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font-family: var(--font-body);
}

.picker-input-row button {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: var(--pink);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preset-grid button {
  border: 3px solid var(--border-light);
  background: white;
  border-radius: 14px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.preset-grid button:hover {
  border-color: var(--pink);
  transform: scale(1.05);
}

.preset-grid img {
  width: 100%;
  height: 70px;
  object-fit: contain;
}

.preset-grid span {
  font-size: 0.7rem;
  font-family: var(--font-heading);
  font-weight: 500;
  display: block;
}

/* ==========================================================================
   BOUTON HAMBURGER + MENU MOBILE/TABLETTE
   ========================================================================== */
.nav-hamburger {
  display: none;                 /* visible uniquement en mobile/tablette */
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.4rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}
.nav-hamburger:hover { background: white; color: var(--pink); }
.nav-hamburger.active { background: white; color: var(--pink); }

/* Panneau du menu mobile (apparaît sous la navbar) */
.nav-mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  padding: 18px 22px 24px;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  z-index: 999;
  animation: mobileMenuIn 0.28s ease;
}
.nav-mobile-menu.open { display: flex; }

@keyframes mobileMenuIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-mobile-link {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: 50px;
  background: rgba(255,255,255,0.12);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all 0.2s;
}
.nav-mobile-link:hover,
.nav-mobile-link.active {
  background: white;
  color: var(--pink);
}
.nav-mobile-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}

/* ==========================================================================
   GALERIE COVERFLOW FAMILLE (portage du composant Originkit CoverflowGallery)
   ========================================================================== */
.coverflow-gallery {
  position: relative;
  max-width: var(--page-width);
  margin: 38px auto 0;
  height: 470px;
  perspective: var(--cf-perspective, 1600px);
  overflow: hidden;
  outline: none;
  touch-action: pan-y;      /* le glissé horizontal est géré par le JS, le scroll vertical reste libre */
  user-select: none;
  -webkit-user-select: none;
}

.coverflow-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.coverflow-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 290px;
  height: 360px;
  border-radius: 26px;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);   /* easing Originkit (easeOutExpo-like) */
  will-change: transform;
  box-shadow: 0 24px 60px rgba(30, 20, 60, .25);
}

/* Fonds pastel derrière chaque personnage (les images sont transparentes) */
.coverflow-card[data-member="grandpere"] .coverflow-art { background: radial-gradient(circle at 50% 30%, #fff7e0, #ffe4a8 75%); }
.coverflow-card[data-member="grandmere"] .coverflow-art { background: radial-gradient(circle at 50% 30%, #fff0f6, #ffc9dd 75%); }
.coverflow-card[data-member="pere"]      .coverflow-art { background: radial-gradient(circle at 50% 30%, #e8f4ff, #b5dbff 75%); }
.coverflow-card[data-member="mere"]      .coverflow-art { background: radial-gradient(circle at 50% 30%, #e9fbef, #b6ecc9 75%); }
.coverflow-card[data-member="enfant"]    .coverflow-art { background: radial-gradient(circle at 50% 30%, #fff1e2, #ffd6ae 75%); }
.coverflow-card[data-member="soeur"]     .coverflow-art { background: radial-gradient(circle at 50% 30%, #f5efff, #d9c8ff 75%); }
.coverflow-card[data-member="rahik"]     .coverflow-art { background: radial-gradient(circle at 50% 30%, #fffae0, #ffe98c 75%); }
.coverflow-card[data-member="oncle"]     .coverflow-art { background: radial-gradient(circle at 50% 30%, #e6fbfb, #abeaea 75%); }
.coverflow-card[data-member="tante"]     .coverflow-art { background: radial-gradient(circle at 50% 30%, #fff0f4, #ffc4d4 75%); }

/* Flèches de navigation */
.coverflow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--orange-dark);
  font-size: 1.9rem;
  line-height: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(40, 30, 10, .18);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.coverflow-arrow.prev { left: 16px; }
.coverflow-arrow.next { right: 16px; }
.coverflow-arrow:hover {
  background: var(--yellow);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 28px rgba(40, 30, 10, .26);
}
.coverflow-arrow:active { transform: translateY(-50%) scale(.94); }

/* Pastilles (dots) */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}
.carousel-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.18);
  cursor: pointer;
  transition: all 0.25s;
}
.carousel-dot.active {
  background: var(--pink);
  width: 30px;
  border-radius: 8px;
}

/* ==========================================================================
   ICÔNES SOCIALES PERSONNALISABLES (PNG / SVG)
   ========================================================================== */
.nav-social-icon img.social-icon-img,
.footer-social a img.social-icon-img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  pointer-events: none;          /* évite de bloquer la sélection de l'ancre */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

/* ==========================================================================
   SÉLECTEUR D'UNITÉ (px / %) pour les dimensions dans l'inspecteur
   ========================================================================== */
.ctx-unit-toggle {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  flex: 0 0 auto;
}
.ctx-unit-btn {
  border: none;
  background: var(--bg-light);
  color: var(--text-muted);
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}
.ctx-unit-btn.active {
  background: var(--pink);
  color: white;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 968px) {
  .hero-content, .tips-content, .app-showcase {
    grid-template-columns: 1fr;
  }
  .app-phone {
    min-height: 300px;
    margin-bottom: 10px;
  }
  .hero-image {
    justify-content: center;          /* recentre l'image en colonne unique */
  }
  .hero-slide-img.active {
    margin-left: 0;                   /* pas de décalage hors écran sur mobile/tablette */
  }
  .coverflow-gallery {
    max-width: 100%;
    height: 400px;
  }
  .coverflow-card {
    width: 230px;
    height: 295px;
  }
  .coverflow-title strong { font-size: 1.2rem; }
  .coverflow-title small { font-size: .68rem; letter-spacing: 1.4px; }
  .coverflow-art { padding: 14px; }
  .coverflow-arrow {
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
  }
  .coverflow-arrow.prev { left: 8px; }
  .coverflow-arrow.next { right: 8px; }
  .hero-text h1 {
    font-size: calc(3.5rem * var(--heading-scale));
  }
  .hero-banner {
    flex-direction: column;
    text-align: center;
  }
  .btn-install {
    margin-left: 0;
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
  .nav-menu-pills,
  .nav-social-group {
    display: none;
  }
  .nav-hamburger {
    display: flex;            /* affiche le bouton hamburger */
  }
  .section-title, .tips-header h2, .app-info h2 {
    font-size: calc(2rem * var(--heading-scale));
  }
  /* Le menu déroulant mobile reprend les icônes sociales */
  .nav-mobile-social .nav-social-icon {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
  }
}

@media (max-width: 600px) {
  .hero-text h1 {
    font-size: calc(2.5rem * var(--heading-scale));
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ACCESSIBILITÉ & CONFORT
   ========================================================================== */

/* Verrouille le défilement de la page quand une modale est ouverte */
body.modal-open,
body.picker-open {
  overflow: hidden;
}

/* Respecte les préférences système : réduit les animations si demandé */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
