/*
Theme Name: Voyages en Utopies
Theme URI: https://raphaelbergere.art
Author: Raphaël Bergère
Author URI: https://www.raphaelbergere.art
Description: Voyages en Utopies
Version: 1
Requires at least: 5.0
Tested up to: 5.4
Requires PHP: 7.0
License: No
License URI:  
*/

/* =============================================================================
   Reset de base
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  
}


    /* Fond vieux papier / blanc cassé */
    body {
        background: #f7f3e9; /* blanc cassé doux */
        margin: 0;
        scroll-behavior: smooth;
        font-family: "Source Sans 3", sans-serif;
        font-weight: 400;
    }

    section {
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .page-content{
      width:100%;
      overflow:hidden;
    }

    #accueil {
        background: transparent; /* le fond est géré par body */
    }

    #page1 {
        background: transparent; /* harmonisé avec body */
    }

    .image-accueil {
        width: 320px;
        cursor: pointer;
        transition: transform .3s ease;
    }

    .image-accueil:hover {
        transform: scale(1.05);
    }


/* =============================================================================
   Menu graphique — page d'accueil
   ============================================================================= */

.graphical-menu-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #f7f3e9;
  overflow: hidden;
}

/* Calque SVG pour les tracés courbes */
.graphical-menu-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Lettre centrale */
.graphical-menu-center {
  position: absolute;
  left: 50%;
  top: 33.333%;
  transform: translate(-50%, -50%);
  background: none;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38vmin;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  z-index: 10;
  cursor: default;
  padding: 0;
  width: auto;
  height: auto;
}

/* Colonnes de boutons (gauche et droite) */
.graphical-menu-col {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graphical-menu-left {
  left: 33.333%;
  transform: translate(-50%, -50%);
}

.graphical-menu-right {
  right: 33.333%;
  transform: translate(50%, -50%);
}



/* Listes de menus WordPress */
.graphical-menu-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3.5vh;
  align-items: center;
}

/* Boutons */
.graphical-menu-col ul li {
  width: 10vw; /* largeur proportionnelle à l'écran */
}

/* Décalages horizontaux — gauche */
.graphical-menu-left ul li:nth-child(1) {
  transform: translateX(-8vw);
}
.graphical-menu-left ul li:nth-child(2) {
  transform: translateX(-4vw);
}
.graphical-menu-left ul li:nth-child(3) {
  transform: translateX(0);
}

/* Décalages horizontaux — droite */
.graphical-menu-right ul li:nth-child(1) {
  transform: translateX(8vw);
}
.graphical-menu-right ul li:nth-child(2) {
  transform: translateX(4vw);
}
.graphical-menu-right ul li:nth-child(3) {
  transform: translateX(0);
}

.graphical-menu-col ul li a {
  display: block;
  width: 100%;
  padding: 0.75em 1em;
  text-decoration: none;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(0.55rem, 1.1vw, 0.85rem); /* fluide desktop */
  white-space: nowrap;
  text-align: center;
  transition:
    background 0.25s ease,
    color 0.25s ease;
  background: transparent;
}

.graphical-menu-col ul li a:hover,
.graphical-menu-col ul li a:focus {
  background: #1a1a1a;
  color: #f5f0eb;
  outline: none;
}

/* Tablette (≤ 1024px) — layout horizontal, tailles réduites */
@media (max-width: 1024px) {
  .graphical-menu-col ul li {
    width: 22vw;
  }
  .graphical-menu-col ul li a {
    font-size: clamp(0.5rem, 1.5vw, 0.75rem);
    letter-spacing: 0.08em;
  }
  .graphical-menu-center {
    font-size: 35vmin;
  }
}

/* Mobile (≤ 768px) — layout vertical empilé */
@media (max-width: 768px) {
  /* Le wrapper devient une colonne flex centrée */
  .graphical-menu-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5vh;
    overflow-y: auto;
  }

  /* Courbes SVG masquées (inutiles en layout vertical) */
  .graphical-menu-svg {
    display: none;
  }

  /* Lettre centrale : position dans le flux */
  .graphical-menu-center {
    position: static;
    transform: none;
    order: 2;
    width: auto;
    height: auto;
    font-size: clamp(4rem, 20vw, 8rem);
    background: none;
    color: #1a1a1a;
  }

  /* Colonnes : position dans le flux */
  .graphical-menu-col {
    position: static;
    transform: none;
    width: 100%;
  }

  .graphical-menu-left {
    order: 1;
  }

  .graphical-menu-right {
    order: 3;
  }

  .graphical-menu-col ul {
    gap: 2.5vh;
  }

  .graphical-menu-col ul li {
    width: clamp(160px, 60vw, 280px);
  }

  .graphical-menu-col ul li a {
    font-size: clamp(0.6rem, 2.5vw, 0.8rem);
    letter-spacing: 0.08em;
    padding: 0.7em 1em;
    border-width: 1px;
  }
}
.image-accueil {
    max-width: 90vw;      /* ne dépasse jamais la largeur de l’écran */
    max-height: 80vh;     /* ne dépasse jamais la hauteur de l’écran */
    width: auto;          /* garde les proportions */
    height: auto;         /* garde les proportions */
    display: block;
    margin: 0 auto;       /* centre horizontalement */
    object-fit: contain;  /* garantit que l’image reste entière */
}
/* =============================================================================
   Menu Burger — Navigation dépliable
   ============================================================================= */

header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2000;
    background: transparent;
    padding: 0;
}

.headercontent {
    position: relative;
    height: 50px;
    display: flex;
    align-items: center; /* centre verticalement */
    justify-content: flex-end;
    padding-right: 20px;
}

.nav-toggler {
    height: 40px;
    display: flex;
    align-items: center; /* centre les barres */
    justify-content: center;
}


/* Bouton burger — trois barres horizontales */
.nav-toggler {
    position: relative;
    width: 50px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 2001;
    pointer-events: auto;
}

.burgerline {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #1a1a1a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animation burger actif */
.nav-toggler.active .burgerline.l1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggler.active .burgerline.l2 {
    opacity: 0;
}

.nav-toggler.active .burgerline.l3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Menu dépliable */
.menu {
    position: fixed;
    top: 60px;
    right: -350px;
    width: 300px;
    height: calc(100vh - 60px);
    background: #f7f3e9;
    border-left: 1px solid #d9d5c9;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    pointer-events: auto;
}

.menu.active {
    right: 0;
}

.menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    margin: 0;
}

.menu ul li {
    margin: 0;
}

.menu ul li a {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    background-color: transparent;
    pointer-events: auto;
}

.menu ul li a:hover {
    background-color: #ede9df;
    border-left-color: #1a1a1a;
    padding-left: 24px;
}

/* S'assurer que le contenu principal n'interfère pas avec le header */
section {
    pointer-events: auto;
}

section#accueil {
    pointer-events: auto;
}

section#accueil a {
    pointer-events: auto;
}

/* Responsive — sur mobile, largeur adaptée */
@media (max-width: 600px) {
    .menu {
        width: 250px;
        right: -250px;
    }
    
    .nav-toggler {
        width: 40px;
        height: 35px;
    }
    
    .burgerline {
        width: 24px;
        height: 2.5px;
    }
}

/* =============================================================================
   Footer
   ============================================================================= */

/* Footer
   ============================================================================= */

footer {
    position: static; /* footer en bas de page, pas fixe */
    background: #f7f3e9;
    border-top: 1px solid #d9d5c9;
    padding: 18px 20px;
    margin-top: 40px; /* espace avant le footer */
}

.footer-content {
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-line {
    font-size: 12px; /* un poil plus gros */
    color: #1a1a1a; /* texte noir */
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.footer-links a {
    text-decoration: none;
    color: #1a1a1a; /* liens noirs */
    transition: color 0.2s ease;
    font-size: 12px;
}

.footer-links a:hover {
    color: #000; /* noir plus intense au survol */
    text-decoration: underline;
}

.footer-separator {
    margin: 0 6px;
    color: #1a1a1a;
}

/* CARTE HEURISTIQUE */

.mindmap-section {
    padding: 80px 40px 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mindmap-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    aspect-ratio: 2 / 1;
}

.mindmap-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.mindmap-line {
    stroke: #1a1a1a;
    stroke-width: 1.5;
    stroke-dasharray: 4, 4;
    fill: none;
}

.mindmap-line.secondary {
    stroke: #666;
    stroke-width: 1;
    stroke-dasharray: 3, 3;
    opacity: 0.6;
}

/* Ovals */
.node-oval {
    padding: 8px 16px;
    border: 2px solid #1a1a1a;
    border-radius: 50px;
    font-size: 13px;
    color: #1a1a1a;
    background: #f7f3e9;
    white-space: nowrap;
    text-transform: capitalize;
    letter-spacing: 0.04em;
    font-weight: 400;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.node-oval.small {
    padding: 6px 12px;
    font-size: 11px;
    border-width: 1.5px;
}

.mindmap-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Nœud central */
.mindmap-node.center {
    left: 50%;
    top: 50%;
    z-index: 20;
}

/* POSITIONS DES NŒUDS - Alignement horizontal fidèle au schéma */

/* Nœud central */
.mindmap-node.center {
    left: 50%;
    top: 50%;
    z-index: 20;
}

/* ========== BRANCHE 1: PROTOPIE (haut-gauche) ========== */
.mindmap-node[data-concept="protopie"] { left: 22%; top: 18%; }
.mindmap-node[data-concept="merveilleux-scientifique"] { left: 3%; top: 2%; }
.mindmap-node[data-concept="solarpunk"] { left: 11%; top: 15%; }
.mindmap-node[data-concept="architecture-proto"] { left: 17%; top: 28%; }

/* ========== BRANCHE 2: DYSTOPIE (gauche-bas) ========== */
.mindmap-node[data-concept="dystopie"] { left: 20%; top: 58%; }
.mindmap-node[data-concept="science-fiction"] { left: 5%; top: 47%; }
.mindmap-node[data-concept="uchronie"] { left: 13%; top: 75%; }

/* ========== BRANCHE 3: HÉTÉROTOPIE (bas-gauche) ========== */
.mindmap-node[data-concept="heterotopie"] { left: 20%; top: 73%; }
.mindmap-node[data-concept="lieux-creation"] { left: 13%; top: 82%; }
.mindmap-node[data-concept="lieux-exposition"] { left: 24%; top: 85%; }

/* ========== BRANCHE 4: VOYAGES (gauche-centre) ========== */
.mindmap-node[data-concept="voyages"] { left: 25%; top: 38%; }

/* ========== BRANCHE 5: MONDES RÉELS (bas-centre) ========== */
.mindmap-node[data-concept="monde-reel"] { left: 38%; top: 65%; }
.mindmap-node[data-concept="societes-humaines"] { left: 23%; top: 72%; }
.mindmap-node[data-concept="cultures"] { left: 38%; top: 73%; }
.mindmap-node[data-concept="interculturalite"] { left: 55%; top: 73%; }
.mindmap-node[data-concept="habiter"] { left: 32%; top: 50%; }
.mindmap-node[data-concept="vivre-ensemble"] { left: 40%; top: 50%; }
.mindmap-node[data-concept="architecture"] { left: 50%; top: 53%; }
.mindmap-node[data-concept="urbanisme"] { left: 58%; top: 58%; }
.mindmap-node[data-concept="villes"] { left: 65%; top: 62%; }
.mindmap-node[data-concept="nature"] { left: 32%; top: 40%; }

/* ========== BRANCHE 6: VOYAGES EN UTOPIES (bas-droite) ========== */
.mindmap-node[data-concept="voyages-en-utopies"] { left: 50%; top: 73%; }
.mindmap-node[data-concept="photographie"] { left: 42%; top: 80%; }
.mindmap-node[data-concept="collage"] { left: 50%; top: 82%; }
.mindmap-node[data-concept="installations"] { left: 60%; top: 82%; }
.mindmap-node[data-concept="dessins-gravures"] { left: 68%; top: 76%; }
.mindmap-node[data-concept="livres-artistes"] { left: 75%; top: 68%; }
.mindmap-node[data-concept="textile"] { left: 80%; top: 62%; }
.mindmap-node[data-concept="multivers"] { left: 73%; top: 55%; }
.mindmap-node[data-concept="fragments-utopies"] { left: 82%; top: 50%; }

/* ========== BRANCHE 7: MONDES IMAGINAIRES (haut-droit) ========== */
.mindmap-node[data-concept="mondes-imaginaires"] { left: 73%; top: 30%; }
.mindmap-node[data-concept="fiction"] { left: 87%; top: 22%; }
.mindmap-node[data-concept="mondes-futurs"] { left: 78%; top: 42%; }

/* ========== BRANCHE 8: FAIRE-MONDE (haut-droit) ========== */
.mindmap-node[data-concept="faire-monde"] { left: 70%; top: 20%; }

/* Responsive tablet */
@media (max-width: 1024px) {
    /* Garder positions proches du desktop */
}

/* Responsive mobile */
@media (max-width: 768px) {
    /* À adapter si nécessaire */
}

.mindmap-node.center .node-oval {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
}

.mindmap-node.active {
    z-index: 50;
}

/* Interaction au survol */
.mindmap-node:hover .node-oval,
.mindmap-node.active .node-oval {
    background: #ede9df;
    border-color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
    text-decoration: underline;
    transform: translateY(-2px);
}

/* MODAL POUR DÉFINITIONS */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
    pointer-events: none;
}

.concept-modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 100;
    pointer-events: none;
}

.concept-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: fixed;
    width: 260px;
    background: #f7f3e9;
    border: 2px solid #1a1a1a;
    border-radius: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    max-height: 300px;
    overflow: hidden;
    top: 100px;
    right: 40px;
    z-index: 100;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
    transition: all 0.2s ease;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    opacity: 1;
}

.modal-content {
    padding: 20px;
    padding-top: 28px;
    max-height: 400px;
    overflow-y: auto;
    flex: 1;
}

.modal-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    text-transform: capitalize;
    line-height: 1.4;
}

.modal-definition {
    margin: 0 0 15px 0;
    font-size: 12px;
    color: #1a1a1a;
    line-height: 1.7;
}

.modal-sources {
    font-size: 11px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

/* DIAPORAMA D'IMAGES */

.slideshow-section {
    min-height: 100vh;
    padding: 60px 40px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideIn 0.8s ease-in-out forwards;
}

.slide-1 {
    background: linear-gradient(135deg, #d4d0c8 0%, #c9c5bd 100%);
    animation-delay: 0s;
}

.slide-2 {
    background: linear-gradient(135deg, #c9c5bd 0%, #bab6ae 100%);
    animation-delay: 0.4s;
}

.slide-3 {
    background: linear-gradient(135deg, #bab6ae 0%, #a9a5a1 100%);
    animation-delay: 0.8s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .mindmap-section {
        padding: 60px 20px 80px;
    }
    
    .mindmap-container {
        max-width: 100%;
        aspect-ratio: 1.5 / 1;
    }
    
    .concept-modal {
        width: 240px;
        right: 20px;
        top: 80px;
        max-height: 50vh;
    }
    
    .modal-content {
        max-height: 350px;
    }
    
    .node-oval {
        padding: 7px 14px;
        font-size: 12px;
        border-width: 1.5px;
    }
}

@media (max-width: 768px) {
    .mindmap-section {
        padding: 40px 15px 60px;
        min-height: auto;
        align-items: flex-start;
    }
    
    .mindmap-container {
        aspect-ratio: 1 / 1;
        margin-bottom: 40px;
    }
    
    .concept-modal {
        position: relative;
        width: 100%;
        right: auto;
        top: auto;
        margin-top: 30px;
        max-height: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .concept-modal.active {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
    }
    
    .modal-content {
        max-height: none;
    }
    
    .node-oval {
        padding: 6px 12px;
        font-size: 10px;
        border-width: 1.5px;
    }
    
    .node-oval.small {
        padding: 4px 8px;
        font-size: 8px;
        border-width: 1px;
    }
    
    .slideshow-section {
        padding: 40px 15px 60px;
    }
    
    .slideshow-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .mindmap-section {
        padding: 30px 10px 50px;
    }
    
    .concept-modal {
        margin-top: 20px;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .node-oval {
        padding: 5px 10px;
        font-size: 9px;
        border-width: 1px;
    }
}

/* =============================================================================
   Page 3 - Galerie Responsive
   ============================================================================= */

.galerie-container {
    width: 100%;
    padding: 80px 40px 120px;
    min-height: 100vh;
    background: #f7f3e9;
}

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.galerie-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.galerie-item:hover {
    transform: scale(1.02);
}

.galerie-image {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
    border: none;
    background: #ede9df;
}

.galerie-info {
    padding: 20px 0;
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.6;
}

.galerie-info p {
    margin: 0;
}

.galerie-info em {
    font-style: italic;
    font-weight: 400;
}

/* MODAL LIGHTBOX */

.galerie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.galerie-modal.active {
    opacity: 1;
    visibility: visible;
}

.galerie-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: #f7f3e9;
    display: flex;
    align-items: stretch;
    border: 1px solid #d9d5c9;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.galerie-modal-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

#galerie-modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.galerie-modal-text {
    width: 300px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f3e9;
    border-left: 1px solid #d9d5c9;
    overflow-y: auto;
}

#galerie-modal-info {
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.8;
    margin: 0;
    text-align: center;
}

#galerie-modal-info em {
    font-style: italic;
}

/* =============================================================================
   Page 2 - Carte Heuristique (Mindmap)
   ============================================================================= */

#page2-mindmap {
    height: 100vh;
    width: 100%;
    background: #f7f3e9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mindmap-section {
    height: 100vh;
    width: 100%;
    background: #f7f3e9;
}

.mindmap-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: auto;
}

.svg-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.svg-wrapper svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* Mindmap Overlay Layer */
.mindmap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

/* Concept Nodes */
.concept-node {
    position: absolute;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    z-index: 550;
    cursor: pointer;
    transition: all 0.2s ease;
}

.concept-node:hover {
    z-index: 600;
}

.concept-label {
    display: block;
    padding: 6px 12px;
    background: rgba(247, 243, 233, 0.95);
    border: 1px solid #1a1a1a;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    text-align: center;
    line-height: 1.3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.23, 1, 0.320, 1);
}

.concept-node:hover .concept-label {
    background: #1a1a1a;
    color: #f7f3e9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Central Concept */
.concept-central .concept-label {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 400;
    border-width: 2px;
}

/* Sub-concepts */
.concept-sub .concept-label {
    font-size: 11px;
    padding: 4px 10px;
}

/* Modales Container */
.modals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.modal.active {
    display: block;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: fixed;
    min-width: 350px;
    max-width: 450px;
    max-height: 70vh;
    background: #f7f3e9;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1001;
    animation: slideInModal 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-inner {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: #1a1a1a;
    transition: all 0.2s ease;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #666;
    transform: scale(1.15);
}

/* Modal Title */
.modal-title {
    font-size: 22px;
    font-weight: 400;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #d9d5c9;
    font-family: "Source Sans 3", sans-serif;
}

/* Modal Sections */
.modal-section {
    margin-bottom: 20px;
}

.modal-section h4 {
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    font-family: "Source Sans 3", sans-serif;
}

.modal-section p {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    margin: 0;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 400;
    text-align: justify;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInModal {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scrollbar styling for modal */
.modal-inner::-webkit-scrollbar {
    width: 6px;
}

.modal-inner::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.modal-inner::-webkit-scrollbar-thumb {
    background: #d9d5c9;
    border-radius: 3px;
}

.modal-inner::-webkit-scrollbar-thumb:hover {
    background: #c9c5b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        min-width: auto;
        max-width: 90vw;
        max-height: 60vh;
    }

    .modal-inner {
        padding: 20px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-section p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 95vw;
        max-height: 70vh;
        min-width: auto;
    }

    .modal-inner {
        padding: 15px;
    }

    .modal-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .modal-section {
        margin-bottom: 15px;
    }

    .modal-section p {
        font-size: 12px;
        line-height: 1.6;
    }
}


.galerie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5001;
    transition: all 0.2s ease;
}

.galerie-modal-close:hover {
    color: #666;
    transform: rotate(90deg);
}

/* RESPONSIVE */

@media (max-width: 1024px) {
    .galerie-container {
        padding: 60px 30px 100px;
    }
    
    .galerie-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 25px 25px;
    }
    
    .galerie-modal-content {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
    }
    
    .galerie-modal-image-wrapper {
        flex: 1;
        max-height: 50vh;
        padding: 30px;
    }
    
    .galerie-modal-text {
        width: 100%;
        border-left: none;
        border-top: 1px solid #d9d5c9;
        max-height: 40vh;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .galerie-container {
        padding: 60px 20px 100px;
    }
    
    .galerie-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px 20px;
    }
    
    .galerie-info {
        padding: 15px 0;
        font-size: 12px;
    }
    
    .galerie-modal-content {
        width: 95%;
        height: 85vh;
    }
    
    .galerie-modal-image-wrapper {
        max-height: 55vh;
        padding: 20px;
    }
    
    .galerie-modal-text {
        max-height: 30vh;
        padding: 20px;
    }
    
    #galerie-modal-info {
        font-size: 13px;
    }
    
    .galerie-modal-close {
        width: 35px;
        height: 35px;
        font-size: 28px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .galerie-container {
        padding: 60px 15px 100px;
    }
    
    .galerie-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px 15px;
    }
    
    .galerie-info {
        padding: 12px 0;
        font-size: 11px;
    }
    
    .galerie-modal-content {
        border: none;
        box-shadow: none;
        max-width: none;
        width: 100%;
        height: 100vh;
    }
    
    .galerie-modal-image-wrapper {
        max-height: 60vh;
        padding: 15px;
    }
    
    .galerie-modal-text {
        max-height: 40vh;
        padding: 15px;
    }
    
    #galerie-modal-info {
        font-size: 12px;
    }
}
/* =============================================================================
   PAGE 2 — CARTE HEURISTIQUE INTERACTIVE
   À intégrer dans style.css, dans la section "Page 2"
   ============================================================================= */

/* SECTION MINDMAP */

.mindmap-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 60px;
    background: transparent;
}

.mindmap-wrapper {
    position: relative;
    width: 100%;
    max-width: 1280px;
}

/* SVG INLINE — aucun style de rendu modifié */
.mindmap-svg-inline {
    width: 100%;
    height: auto;
    display: block;
}

/* Police SVG — Source Sans 3 (écrase le font-family ArialMT codé en dur par Illustrator) */
.mindmap-svg-inline text,
.mindmap-svg-inline tspan {
    font-family: "Source Sans 3", sans-serif;
}

/* ZONES INTERACTIVES — les groupes notion-node */
.notion-node {
    cursor: pointer;
    pointer-events: bounding-box; /* toute la zone de l'étiquette est interactive */
}

/* Soulignement du texte au survol — fonctionne quand text est dans .notion-node */
.notion-node:hover text,
.notion-node:hover tspan {
    text-decoration: underline;
    text-decoration-color: #1a1a1a;
}

/* Léger highlight de l'oval au survol */
.notion-node:hover path {
    fill: rgba(237, 233, 223, 0.6); /* #ede9df à 60% */
}

/* =============================================================================
   FENÊTRE FLOTTANTE (popup au survol)
   ============================================================================= */

.notion-popup {
    position: fixed;
    z-index: 500;
    pointer-events: none; /* ne bloque pas les interactions SVG */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    max-width: 240px;
    min-width: 200px;
}

.notion-popup.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.notion-popup-inner {
    background: #f7f3e9; /* même couleur de fond que le site */
    border: 1.5px solid #1a1a1a;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* SECTION DÉFINITION */
.notion-popup-section {
    padding: 16px 18px;
}

/* LABEL DE SECTION */
.notion-popup-label {
    font-family: inherit;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #999;
    margin: 0 0 8px 0;
    line-height: 1;
}

/* TEXTE */
.notion-popup-text {
    font-family: inherit;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.65;
    margin: 0;
}

/* SÉPARATEUR CENTRÉ ET PARTIEL */
.notion-popup-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
}

.notion-popup-divider-line {
    display: block;
    width: 40%; /* trait partiel centré */
    height: 1px;
    background: #1a1a1a;
    opacity: 0.25;
}

/* =============================================================================
   PAGE 3 — CARTE PLASTIQUE INTERACTIVE
   ============================================================================= */

.plastique-section {
    padding: 40px 80px 60px;
    display: flex;
    justify-content: center;
}

.plastique-wrapper {
    position: relative;
    width: 100%;
    max-width: 1100px;
}

.plastique-svg-inline {
    width: 100%;
    height: auto;
    display: block;
}

/* Police SVG — Source Sans 3 (écrase ArialMT codé par Illustrator) */
.plastique-svg-inline text,
.plastique-svg-inline tspan {
    font-family: "Source Sans 3", sans-serif;
}

/* Curseur sur les nœuds interactifs */
.plastique-svg-inline .notion-node {
    cursor: pointer;
}

@media (max-width: 768px) {
    .plastique-section {
        padding: 30px 16px 50px;
    }
}

/* ============================
   PAGE À PROPOS — Mise en page
   ============================ */

.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 90px 20px 30px;
}

/* Sections compactes */
.about-section {
    margin: 0 0 25px 0;
    padding: 0;
    height: auto;
    display: block;
}

/* Titre */
.about-title {
    font-size: 1.2rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

/* Italique élégant */
.about-title em {
    font-style: italic;
}

/* Texte */
.about-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px 0;
    color: #333;
}

/* Supprime les marges par défaut des balises HTML dans cette page */
.about-container h2,
.about-container p {
    margin: 0;
    padding: 0;
}

.about-container section {
    margin: 0;
    padding: 0;
    height: auto;
    display: block;
}

/* PAGE 6 — image ronde avec wrapping de texte */
.page6-container {
    max-width: 1000px;
}

.page6-container .page6-portrait {
    float: left;
    width: 420px !important;
    height: 420px !important;
    object-fit: contain;
    shape-outside: circle(50% at 50% 50%);
    margin-right: 2em;
    margin-bottom: 1em;
}

.page6-clearfix {
    clear: both;
}

/* Sections supplémentaires page6 */
.page6-cv-section {
    margin-top: 50px;
}

.page6-bottom-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 80px;
    padding-bottom: 60px;
}

.page6-liens-section,
.page6-contact-section {
    margin-top: 0;
}

/* CV */
.page6-cv-section > .cv-block:first-child {
    margin-top: 6px;
}

.cv-block {
    margin-top: 22px;
}

.cv-col .cv-block:first-child {
    margin-top: 0;
}

.cv-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.cv-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cv-list li,
.cv-text {
    font-size: 0.8rem;
    line-height: 1.55;
    color: #000;
    margin: 0;
    text-align: justify;
}

.cv-date {
    color: #666;
}

.cv-subhead {
    font-size: 0.78rem;
    font-weight: 600;
    font-style: italic;
    color: #555;
    margin: 10px 0 3px;
}

.cv-text + .cv-subhead {
    margin-top: 12px;
}

.cv-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 22px;
}

/* Liens */
.page6-liens-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page6-liens-list a {
    color: #000;
    text-decoration: underline;
    font-size: 0.9rem;
}

/* Formulaire de contact */
.page6-contact-form {
    display: flex;
    flex-direction: column;
    max-width: 560px;
}

.page6-form-row {
    display: flex;
    gap: 24px;
}

.page6-form-row input,
.page6-contact-form textarea {
    font-family: inherit;
    font-size: 0.9rem;
    color: #333;
    background: transparent;
    border: none;
    border-bottom: 1px solid #666;
    padding: 10px 0;
    outline: none;
    resize: none;
    width: 100%;
}

.page6-form-row input::placeholder,
.page6-contact-form textarea::placeholder {
    color: #666;
}

.page6-contact-form textarea {
    margin-top: 2px;
    height: 90px;
}

.page6-contact-form button {
    align-self: flex-start;
    margin-top: 16px;
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    padding: 2px 0;
    cursor: pointer;
    color: #333;
    transition: opacity 0.2s;
}

.page6-contact-form button:hover {
    opacity: 0.5;
}

.page6-contact-success {
    font-size: 0.9rem;
    color: #555;
    font-style: italic;
}

/* =========================================================
   LAYOUT PRINCIPAL
========================================================= */

/* Bloque le scroll sur la page carte — elle doit tenir dans le viewport */
body.page-template-page1 {
    overflow: hidden;
    height: 100vh;
}

.page1-layout {
    display: flex;
    width: 100%;
    height: calc(100vh - 50px);
    margin-top: 50px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

/* Compensation pour la barre admin WordPress (visible admin uniquement) */
.admin-bar .page1-layout {
    height: calc(100vh - 50px - 32px);
    margin-top: calc(50px + 32px);
}

.svg-zone {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    transition: margin 0.4s ease;
}

/* Le SVG se cale dans la zone disponible en conservant ses proportions */
.photomap-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Police SVG — Source Sans 3 Regular (écrase ArialMT codé par Illustrator) */
.photomap-svg text,
.photomap-svg tspan {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 400;
}

/* =========================================================
   PANNEAU COULISSANT
========================================================= */

/* Overlay transparent — capture les clics hors panneau */
.panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1499;
    cursor: default;
}

.panel-overlay.active {
    display: block;
}

.photo-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 33vw;
    background: #f7f3e9;
    overflow: hidden;           /* le scroll est sur .photo-panel-inner */
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 2500;
    transform: translateX(100%); /* cache par defaut */
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panneau depuis la gauche */
.photo-panel.left {
    left: 0;
    right: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.10);
    transform: translateX(-100%);
}

/* Panneau depuis la droite */
.photo-panel.right {
    right: 0;
    left: auto;
    box-shadow: -4px 0 24px rgba(0,0,0,0.10);
    transform: translateX(100%);
}

.photo-panel.open {
    transform: translateX(0);
}

.panel-close {
    position: absolute;        /* ancré sur .photo-panel (fixed), ne défile pas */
    top: 90px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    color: #1a1a1a;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    opacity: 0.5;
    z-index: 1;
    transition: opacity 0.15s ease;
}

.panel-close:hover {
    opacity: 1;
}

.photo-panel-inner {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-top: 110px;        /* espace pour la croix + admin bar + header */
}

.panel-title {
    font-family: "Source Sans 3", sans-serif;
    font-size: 24px;
    margin-bottom: 20px;
}

/* =========================================================
   MINIATURES (rectangles gris avec drop shadow)
========================================================= */

.panel-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

/* =========================================================
   VISUALISEUR PHOTO (2/3 de l'ecran, cote oppose au panneau)
========================================================= */

.photo-viewer {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    background: transparent;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.photo-viewer.active {
    display: flex;
}

/* Panneau gauche → visualiseur sur la droite */
.photo-viewer.panel-left {
    left: 33vw;
    right: 0;
}

/* Panneau droite → visualiseur sur la gauche */
.photo-viewer.panel-right {
    left: 0;
    right: 33vw;
}

.photo-viewer-img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.photo-viewer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #1a1a1a;
    cursor: pointer;
    pointer-events: all;
    padding: 4px 8px;
    line-height: 1;
    opacity: 0.45;
    transition: opacity 0.15s ease;
}

.photo-viewer-close:hover {
    opacity: 1;
}

/* =========================================================
   MINIATURES
========================================================= */

.photo-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    background: #d8d8d8;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.photo-thumb:hover {
    opacity: 0.85;
    box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}



/* ============================================
   carnets.css — Visionneuse de carnets
   ============================================ */
 
.carnets-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 4rem 0 0.5rem;
  font-family: sans-serif;
}
 
/* ── Livre ── */
 
.carnets-book-wrapper {
  position: relative;
  width: 750px;
  height: 482px;
}
 
.carnets-book-shadow {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 18px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  filter: blur(6px);
}
 
.carnets-spread {
  position: relative;
  width: 750px;
  height: 455px;
}
 
/* ── Pages statiques (gauche / droite) ── */
 
.carnets-left,
.carnets-right {
  position: absolute;
  width: 371px;
  height: 455px;
  overflow: hidden;
  z-index: 0;
  background: #e8e4de;
}
 
.carnets-left {
  left: 0;
  border-radius: 6px 0 0 6px;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  border-right: none;
}
 
.carnets-right {
  right: 0;
  border-radius: 0 6px 6px 0;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  border-left: none;
}
 
.carnets-left img,
.carnets-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
 
/* ── Tranche ── */
 
.carnets-spine {
  position: absolute;
  left: 367px;
  top: 0;
  width: 12px;
  height: 455px;
  background: #d6d0c8;
  border-left: 0.5px solid rgba(0, 0, 0, 0.12);
  border-right: 0.5px solid rgba(0, 0, 0, 0.12);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
 
.carnets-spine-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
}
 
/* ── Page en cours de rotation (JS injecte cet élément) ── */
 
.carnets-flipper-wrapper {
  position: absolute;
  top: 0;
  z-index: 15;
  width: 371px;
  height: 455px;
  perspective: 1200px;
}

.carnets-flipper {
  position: absolute;
  width: 371px;
  height: 455px;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.645, 0.045, 0.355, 1);
}
 
.carnets-flip-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  background: #e8e4de;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
}
 
.carnets-flip-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
 
.carnets-flip-face.back {
  transform: rotateY(180deg);
}
 
/* ── Boutons de navigation ── */
 
.carnets-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background 0.15s, border-color 0.15s;
  color: #222;
  font-size: 16px;
  padding: 0;
}
 
.carnets-nav:hover {
  background: #f2ede8;
  border-color: rgba(0, 0, 0, 0.25);
}
 
.carnets-nav:active {
  transform: translateY(-50%) scale(0.96);
}
 
.carnets-nav:disabled {
  opacity: 0.28;
  cursor: default;
}
 
.carnets-nav.prev { left: -52px; }
.carnets-nav.next { right: -52px; }
 
/* ── Compteur de pages ── */
 
.carnets-counter {
  font-size: 12px;
  color: #888;
  text-align: center;
  letter-spacing: 0.04em;
}
 
/* ── Étagère de sélection ── */
 
.carnets-shelf {
  display: flex;
  align-items: flex-end;
  gap: 0;
  justify-content: center;
}
 
.carnets-cat-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
 
.carnets-cat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #aaa;
  padding-left: 4px;
}
 
.carnets-cat-books {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
 
.carnets-separator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 14px 2px;
  align-self: stretch;
}
 
.carnets-sep-line {
  width: 1px;
  flex: 1;
  background: rgba(0, 0, 0, 0.10);
  min-height: 40px;
}
 
/* ── Miniature carnet ── */
 
.carnets-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.15s;
  border: none;
  background: none;
  padding: 0;
}
 
.carnets-thumb:hover {
  transform: translateY(-4px);
}
 
.carnets-thumb-cover {
  width: 48px;
  height: 64px;
  border-radius: 2px 5px 5px 2px;
  border: 0.5px solid rgba(0, 0, 0, 0.10);
  position: relative;
  transition: box-shadow 0.2s;
  overflow: hidden;
  background: #c5b49a;
}
 
.carnets-thumb-cover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 2px 0 0 2px;
  z-index: 1;
}
 
.carnets-thumb-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
 
.carnets-thumb.active .carnets-thumb-cover {
  box-shadow: 0 0 0 2px #222;
}
 
.carnets-thumb-name {
  font-size: 10px;
  color: #888;
  text-align: center;
  max-width: 52px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
.carnets-thumb.active .carnets-thumb-name {
  color: #222;
  font-weight: 500;
}

/* =============================================================================
   RESPONSIVE COMPLÉMENTAIRE — tablette et mobile
   ============================================================================= */

/* iOS Safari : height: 100svh évite le recadrage par la barre de navigation */
@media (max-width: 768px) {
  section {
    height: 100vh; /* fallback navigateurs anciens */
    height: 100svh;
  }
}

/* --- Page 6 : portrait flottant --- */
@media (max-width: 768px) {
  .page6-container .page6-portrait {
    width: 260px !important;
    height: 260px !important;
  }
}

@media (max-width: 600px) {
  .page6-container .page6-portrait {
    float: none;
    display: block;
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto 1.5em;
    shape-outside: none;
  }

  .page6-bottom-columns {
    grid-template-columns: 1fr;
    margin-top: 40px;
    gap: 30px;
  }

  .cv-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page6-form-row {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 480px) {
  .page6-container .page6-portrait {
    width: 160px !important;
    height: 160px !important;
  }

  .page6-bottom-columns {
    margin-top: 30px;
    padding-bottom: 40px;
  }
}

/* --- Carnets — visionneuse de livres (largeurs fixes → scale responsive) ---
   Le livre mesure 750 × 482 px. On le réduit proportionnellement par paliers.
   margin-bottom compense la hauteur perdue : 482 × (1 − scale)            */
@media (max-width: 820px) {
  .carnets-scene {
    overflow-x: hidden;
    padding-top: 2rem;
  }

  .carnets-book-wrapper {
    transform: scale(0.78);
    transform-origin: top center;
    margin-bottom: -106px;
  }

  /* Boutons de navigation ramenés à l'intérieur du livre pour éviter
     qu'ils sortent du viewport une fois le livre mis à l'échelle */
  .carnets-nav.prev { left: 8px; }
  .carnets-nav.next { right: 8px; }
}

@media (max-width: 600px) {
  .carnets-book-wrapper {
    transform: scale(0.58);
    margin-bottom: -203px;
  }
}

@media (max-width: 420px) {
  .carnets-book-wrapper {
    transform: scale(0.44);
    margin-bottom: -270px;
  }
}

/* --- Carte photomap — panneau coulissant et visionneuse --- */
@media (max-width: 768px) {
  .photo-panel {
    width: min(88vw, 360px);
  }

  /* Visionneuse : overlay plein écran sur mobile (plus de place sur le côté) */
  .photo-viewer.panel-left,
  .photo-viewer.panel-right {
    left: 0;
    right: 0;
    background: rgba(247, 243, 233, 0.96);
    z-index: 3000;
  }
}

@media (max-width: 480px) {
  .photo-panel {
    width: 100vw;
    box-shadow: none;
  }
}
 