/* ——— Layout ——— */
:root {
    --sidebar-width: 320px; /* Conservé au cas où, mais la sidebar n'existe plus */
    --shf-green-dark: #1F6B3E;
    --shf-green-light: #5B8727;
    --shf-red: #943F2B;
    --text-color-light: #FFFFFF;
    --text-color-dark: #37474f;
    --border-color: #e0e0e0;
    --border-color-alpha: rgba(255, 255, 255, 0.3);
    --block-bg-alpha: rgba(255, 255, 255, 0.1); /* Conservé pour .card si besoin */
    --input-bg-alpha: rgba(255, 255, 255, 0.15); /* Conservé pour .card si besoin */
    --sidebar-bg: rgba(31, 107, 62, 0.6); /* Conservé au cas où */
    --accent-color: #5B8727;
    --accent-color-dark: #1F6B3E;
    --hue-primary: 223;
    --hue-secondary: 178;
    --primary500: hsl(var(--hue-primary), 90%, 50%);
    --primary600: hsl(var(--hue-primary), 90%, 60%);
    --primary700: hsl(var(--hue-primary), 90%, 70%);
    --secondary800: hsl(var(--hue-secondary), 90%, 80%);
    --dark-gray50: hsl(var(--hue-primary), 90%, 5%);
    --dark-gray100: hsl(var(--hue-primary), 90%, 10%);
    --white0: hsla(0, 0%, 100%, 0);
    --white50: hsla(0, 0%, 100%, 0.05);
    --white100: hsla(0, 0%, 100%, 0.1);
    --white200: hsla(0, 0%, 100%, 0.2);
    --white300: hsla(0, 0%, 100%, 0.3);
    --white400: hsla(0, 0%, 100%, 0.4);
    --white500: hsla(0, 0%, 100%, 0.5);
    --white: hsl(0, 0%, 100%);
}

/* Titre animé principal */
#app-title {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    text-align: center;
    pointer-events: none;
    font-family: 'Caladea', serif;
    font-size: clamp(1.5rem, 4.5vw, 2.8rem);
    font-weight: 700;
    color: white;
    line-height: 1.1;
    letter-spacing: 0.02em;
    opacity: 0;
    display: none;
    padding: 20px 40px 25px 40px;
    border-radius: 15px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(101, 67, 33, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    min-width: max-content;
}

#app-title .title-line {
    display: block;
    margin-bottom: 0.2em;
    position: relative;
    z-index: 1;
}

#app-title .title-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotateX(90deg);
    transform-origin: center bottom;
    filter: blur(8px);
    position: relative;
    z-index: 1;
}

#app-title .title-space {
    display: inline-block;
    width: 0.3em;
}

#app-title .title-info {
    display: block;
    margin-top: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
}

#app-title .title-info .info-item {
    display: inline-block;
    margin: 0 15px;
    white-space: nowrap;
}

#app-title .title-info .info-item i {
    margin-right: 6px;
    opacity: 0.8;
}

#app-title .title-info .latin-name {
    font-style: italic;
    font-weight: 400;
}

#app-title:before,
#app-title:after {
    border-radius: inherit;
    content: "";
    display: block;
    position: absolute;
    inset: 0;
}

#app-title:before {
    border: 1px solid rgba(255, 255, 255, 0.6);
    mask-image: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0) 50%);
    -webkit-mask-image: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0) 50%);
}

#app-title:after {
    border: 1px solid rgba(255, 255, 255, 0.6);
    mask-image: linear-gradient(135deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 1));
    -webkit-mask-image: linear-gradient(135deg, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 1));
}

body, html { margin:0; padding:0; height:100%; width:100%; font-family: 'Quicksand', Arial, Helvetica, sans-serif; font-weight: 500; overflow:hidden; }
#app { display:flex; height:100%; width:100%; }
/* Styles #sidebar et enfants supprimés */
#map { flex:1; height:100%; background:#e5e5e5; }
.logo{display: none; width:80%; height:auto; display:block; margin:0 auto 25px auto;} /* Conservé au cas où */

/* Tous les styles spécifiques à la sidebar, aux contrôles de formulaire, popups, etc. sont supprimés ici */

/* Styles pour le panneau de résultats Glassmorphic */
.card {
    --blur: 12px;
    border-radius: 1em;
    font-family: 'Quicksand', sans-serif;
    line-height: 1.6;
    font-size: 0.9rem;
}

.card.card--glass {
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    background: rgba(101, 67, 33, 0.4);
}

.card.card--glass:before,
.card.card--glass:after {
    border-radius: inherit;
    content: "";
    display: block;
    position: absolute;
    inset: 0;
}

.card.card--glass:before {
    border: 1px solid var(--white);
    mask-image: linear-gradient(135deg,var(--white),var(--white0) 50%);
    -webkit-mask-image: linear-gradient(135deg,var(--white),var(--white0) 50%);
}

.card.card--glass:after {
    border: 1px solid var(--white);
    mask-image: linear-gradient(135deg,var(--white0) 50%,var(--white));
    -webkit-mask-image: linear-gradient(135deg,var(--white0) 50%,var(--white));
}

.card .card__content {
    position: relative;
    z-index: 1;
    padding: 35px 35px 15px 35px; /* Haut: 35px, Droite: 35px, Bas: 15px, Gauche: 35px */
    color: white;
    background: none;
    transition: filter 0.3s ease;
}

/* Effet de flou sur le contenu quand tooltip affiché */
.card .card__content.blur-content {
    filter: blur(4px);
}

.card .card__content .card__title {
    font-family: 'Rubik', Caladea, serif;
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.17;
    margin-bottom: 8px;
    color: white;
    text-align: left;
    text-shadow: none;
}

.card .card__content .card__location {
    display: flex;
    align-items: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 15px;
    text-align: left;
}

.card .card__content .card__location i {
    margin-right: 8px;
    opacity: 0.7;
    font-size: 0.9em;
}

.card__overlay-image {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: auto;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
}

.card__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0 1.5em 1em 1.5em;
    margin-top: 0.25em;
    position: relative; 
    z-index: 10;
    flex-wrap: nowrap; /* Empêche le retour à la ligne pour garder tous les boutons sur une ligne */
}

.card__actions button {
    pointer-events: auto;
}

#results-panel {
  position: fixed;
  width: 480px; /* Élargi de 400px à 480px pour que tous les boutons tiennent en une ligne */
  z-index: 1002;
  padding: 0;
}

/* Boutons de contrôle glassmorphiques */
.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--white300);
    background: var(--white100);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.control-btn:hover {
    background: var(--white200);
    border-color: var(--white400);
    transform: translateY(-1px);
}

.control-btn.control-btn--active {
    background: var(--white300);
    border-color: var(--white500);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-btn.control-btn--active:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, var(--white200), var(--white100));
    border-radius: inherit;
    z-index: -1;
}

/* Style glassIco pour les boutons de navigation */
.glassIco {
    --width: 40px;
    box-sizing: border-box;
    width: var(--width);
    height: var(--width);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    margin: 5px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: transform 200ms ease, box-shadow 200ms ease;
    font-family: 'Rubik', sans-serif;
    outline: none;
}

.glassIco:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    filter: blur(0px);
    transition: transform 400ms ease;
    transform: skewX(45deg) translateX(calc(var(--width) * -2));
    z-index: 1;
}

.glassIco:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

.glassIco:hover:before {
    transform: skewX(45deg) translateX(calc(var(--width) * 2));
}

.glassIco span {
    opacity: 0.9;
    position: relative;
    z-index: 2;
    transition: opacity 200ms ease;
}

.glassIco:hover span {
    opacity: 1;
}

/* État actif pour les boutons glassIco */
.glassIco--active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.glassIco--active:before {
    transform: skewX(45deg) translateX(calc(var(--width) * -2));
}

.glassIco--active span {
    opacity: 1;
}

/* Ajustement pour les boutons dans .card__actions */
.card__actions .glassIco {
    margin: 0;
}

/* Zone de contenu avec scroll glassmorphic */
#results-details {
    max-height: calc(100vh - 300px); /* Ajuster selon la hauteur des autres éléments */
    overflow-y: auto;
    padding-right: 5px; /* Espace pour la scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Scrollbar webkit pour navigateurs Chromium */
#results-details::-webkit-scrollbar {
    width: 8px;
}

#results-details::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#results-details::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#results-details::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mini-carte de progression - Style glassmorphique */
#progress-minimap {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 360px; /* Élargi de 20% (300px → 360px) */
    height: 342px; /* Hauteur adaptée proportionnellement */
    z-index: 1000;
    display: none;
    --blur: 12px;
    border-radius: 1em;
    font-family: 'Quicksand', sans-serif;
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    background: rgba(101, 67, 33, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#progress-minimap:before,
#progress-minimap:after {
    border-radius: inherit;
    content: "";
    display: block;
    position: absolute;
    inset: 0;
}

#progress-minimap:before {
    border: 1px solid var(--white);
    mask-image: linear-gradient(135deg,var(--white),var(--white0) 50%);
    -webkit-mask-image: linear-gradient(135deg,var(--white),var(--white0) 50%);
}

#progress-minimap:after {
    border: 1px solid var(--white);
    mask-image: linear-gradient(135deg,var(--white0) 50%,var(--white));
    -webkit-mask-image: linear-gradient(135deg,var(--white0) 50%,var(--white));
}

#progress-minimap .minimap-content {
    position: relative;
    z-index: 1;
    padding: 20px;
    color: white;
    height: 100%;
    box-sizing: border-box;
}

#progress-minimap .minimap-indicators {
    display: flex;
    justify-content: space-around; /* Répartition équitable des 3 indicateurs */
    align-items: center;
    margin-bottom: 10px;
    gap: 5px;
}

#progress-minimap .minimap-indicator {
    display: flex;
    align-items: center;
    justify-content: center; /* Centrage interne */
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    flex: 1;
    text-align: center;
}

#progress-minimap .minimap-indicator i {
    font-size: 20px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.8);
}

#progress-minimap .minimap-indicator span {
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

#minimap-container {
    width: 100%;
    height: calc(100% - 65px); /* Espace réduit de 15px pour timeline à 10px du bas */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Timeline d'étapes intégrée dans la mini-carte */
.minimap-timeline {
    position: absolute;
    bottom: 10px; /* Réduit de 5px : 10px du bord bas de la card */
    left: 20px;
    right: 20px;
    height: 40px;
    padding: 5px 0;
    box-sizing: border-box;
}

.minimap-timeline .timeline-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    transform: translateY(-50%);
}

.minimap-timeline .timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
    transition: width 0.6s ease;
}

.minimap-timeline .timeline-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0;
}

.minimap-timeline .timeline-step {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

/* États des points */
.minimap-timeline .timeline-step.step-future {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.minimap-timeline .timeline-step.step-passed {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.minimap-timeline .timeline-step.step-current {
    background: #ff3333;
    border: 3px solid #ffffff;
    box-shadow: 0 0 12px rgba(255, 51, 51, 0.6);
    transform: scale(1.3);
}

/* Hover effects */
.minimap-timeline .timeline-step:hover {
    transform: scale(1.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.minimap-timeline .timeline-step.step-current:hover {
    transform: scale(1.5);
}

/* Système d'assombrissement de la carte avec nom d'étape - Style glassmorphique */
.minimap-step-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(101, 67, 33, 0.8); /* Teinte dérivée du glassmorphisme */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    z-index: 10;
}

.minimap-step-overlay.show {
    opacity: 1;
}

.minimap-step-name {
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    padding: 12px 20px;
    background: rgba(101, 67, 33, 0.5); /* Teinte glassmorphique cohérente */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.minimap-step-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.minimap-step-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.minimap-step-location i {
    font-size: 14px;
    opacity: 0.8;
}

/* Overlay de tooltip pour les boutons du panneau de droite */
.panel-tooltip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px; /* Laisse 60px pour la zone des boutons */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.panel-tooltip-overlay.show {
    opacity: 1;
}

.panel-tooltip-content {
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 80%;
    background: rgba(101, 67, 33, 0.6); /* Fond plus opaque pour le contenu */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.panel-tooltip-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.panel-tooltip-description {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Styles pour les boutons welcome (écran d'accueil et étape finale) */
.welcome-button {
    width: auto;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: 'Quicksand', Arial, Helvetica, sans-serif;
}

.welcome-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Styles pour le logo Mapbox dans la mini-carte */
#minimap-container .mapboxgl-ctrl-logo {
    bottom: 5px !important;
    right: 5px !important;
    left: auto !important;
    width: 50px !important;
    height: 16px !important;
    background-size: 50px 16px !important;
    opacity: 0.6 !important;
}

#minimap-container .mapboxgl-ctrl-attrib {
    bottom: 5px !important;
    right: 60px !important;
    left: auto !important;
    font-size: 9px !important;
    opacity: 0.6 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
}
