/* Plantayo, mon petit jardin */
.pl-hero h1 em { color: #2f9e44; }
.pl-app { display: block; }
.pl-lieu { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pl-prompt { flex: 1 1 360px; margin: 0; }
.pl-lieu .addr-list { top: 100%; }
.pl-lieu-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pl-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: #2f9e44; border: 0; border-radius: 999px; cursor: pointer; }
.pl-btn:hover { filter: brightness(1.07); }
.pl-btn:disabled { opacity: .45; cursor: default; filter: none; }
.pl-btn-lite { color: #2b8a3e; background: #ebfbee; border: 1px solid #b2f2bb; }
.pl-btn.actif { background: #e8590c; }
.pl-btn.pl-a-sauver { box-shadow: 0 0 0 3px #ffd8a8; }
.pl-save-etat { font-size: 13px; color: var(--muted); }
.pl-status { margin: 12px 0 !important; }

.pl-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 16px; align-items: start; }
.pl-3d { height: min(640px, 75vh); margin-top: 0; }
.pl-vide { display: grid; place-items: center; gap: 10px; height: 420px; padding: 20px; text-align: center; color: #9aa1b5; background: #1d2230; border-radius: 12px; grid-column: 1; }
.pl-vide i { font-size: 42px; color: #40c057; }
.pl-vide[hidden], .pl-panneau[hidden] { display: none; }
.pl-panneau { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; max-height: min(640px, 75vh); overflow-y: auto; padding-right: 4px; }
.pl-bloc { min-width: 0; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pl-bloc h3 { margin: 0 0 10px; font-size: 16px; }
.pl-bloc h3 i { color: #2f9e44; margin-right: 6px; }
.pl-bloc h4 { margin: 12px 0 8px; font-size: 14px; }
.pl-champ { display: grid; gap: 4px; margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.pl-champ select, .pl-champ input[type=number] { width: 100%; min-width: 0; max-width: 100%; padding: 6px 8px; font-weight: 400; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pl-champ-ligne { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-champ-ligne select, .pl-champ-ligne input[type=number] { width: auto; flex: 0 1 auto; }
.pl-champ-ligne input[type=number] { width: 80px; }
.pl-champ input[type=range] { width: 100%; accent-color: #2f9e44; }
.pl-annee { font-weight: 600; color: #2b8a3e; }
.pl-coche { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; font-weight: 400; }
.pl-espece-info { margin: -2px 0 8px; font-size: 12px; color: var(--muted); }
.pl-raccourcis { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.pl-raccourcis button { padding: 3px 9px; font: inherit; font-size: 12px; background: #f1f3f5; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.pl-arbres { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.pl-arbres li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13px; background: #f8f9fa; border-radius: 8px; }
.pl-arbres li.choisi { background: #fff9db; outline: 1px solid #ffd43b; }
.pl-arbre-txt { flex: 1; display: grid; cursor: pointer; }
.pl-arbre-txt small { color: var(--muted); }
.pl-arbres button { padding: 0 8px; font: inherit; color: #fff; background: #868e96; border: 0; border-radius: 999px; cursor: pointer; }
.pl-aide { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.pl-ok { margin: 0; font-size: 13px; color: #2b8a3e; }
.pl-serie { margin: 8px 0 0; font-size: 12px; color: #495057; }
.pl-table { width: 100%; margin: 4px 0 0; border-collapse: collapse; font-size: 12px; }
.pl-table th, .pl-table td { padding: 5px 4px; border-bottom: 1px solid #eef0f3; text-align: left; width: auto; }
.pl-table th { font-size: 11px; color: var(--muted); font-weight: 600; }
.pl-table tbody tr { cursor: pointer; }
.pl-table tbody tr:hover { background: #ebfbee; }
.pl-effet:empty { display: none; }
.pl-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-carte { display: grid; gap: 2px; padding: 10px; background: #f8f9fa; border-radius: 10px; }
.pl-carte-titre { font-size: 11px; color: var(--muted); }
.pl-carte b { font-size: 17px; }
.pl-carte small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.pl-methode { margin-top: 18px; font-size: 14px; color: #495057; }
.pl-methode summary { cursor: pointer; font-weight: 600; color: #2b8a3e; }
.pl-methode ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
@media (max-width: 900px) {
  .pl-grille { grid-template-columns: 1fr; }
  .pl-panneau { max-height: none; }
}
.pl-surface { display: block; font-size: 11px; color: var(--muted); }
.pl-ete { margin: 8px 0 0; padding: 8px 10px; font-size: 12px; color: #2b8a3e; background: #ebfbee; border-radius: 8px; }
.pl-an { font-weight: 600; white-space: nowrap; }
.pl-frais { display: grid; gap: 3px; margin: 8px 0 0; padding: 8px 10px; font-size: 12px; color: #1864ab; background: #e7f5ff; border-radius: 8px; }
.pl-alerte { margin: 6px 0 0; font-size: 12px; color: #c92a2a; }
.pl-jardins { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pl-jardin { display: inline-flex; align-items: center; border: 1px solid #b2f2bb; border-radius: 999px; background: #ebfbee; overflow: hidden; }
.pl-jardin button { padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; color: #2b8a3e; background: none; border: 0; cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-jardin.vide { background: #fff; border-style: dashed; }
.pl-jardin.vide button { font-weight: 400; color: #868e96; }
.pl-jardin.actif { background: #2f9e44; border-color: #2f9e44; }
.pl-jardin.actif button { color: #fff; }
.pl-jardin .pl-jardin-x { padding: 7px 10px 7px 4px; font-weight: 400; opacity: .7; }
.pl-jardin .pl-jardin-x:hover { opacity: 1; }
.pl-btn.actif-partage { color: #fff; background: #1c7ed6; border-color: #1c7ed6; }
.pl-partage { margin-top: 10px; padding: 10px 12px; background: #e7f5ff; border: 1px solid #a5d8ff; border-radius: 10px; }
.pl-partage-ligne { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pl-partage-lien { flex: 1 1 220px; min-width: 0; padding: 7px 10px; font: 12px 'JetBrains Mono', monospace; border: 1px solid #a5d8ff; border-radius: 8px; background: #fff; }
.pl-partage .pl-btn { padding: 6px 12px; font-size: 13px; text-decoration: none; }
.pl-partage .pl-revoquer { color: #c92a2a; background: #fff5f5; border-color: #ffc9c9; }
.pl-partage .pl-aide { margin: 8px 0 0; }
.pl-partage-tete { margin-bottom: 4px; }

/* Présentation (plantayo_presentation.php) */
.pl-ouvrir { margin-top: 18px; }
.pl-ouvrir .pl-btn { padding: 10px 20px; font-size: 16px; text-decoration: none; }
.pl-ouvrir .pl-btn:hover { color: #fff; text-decoration: none; }
.pl-bref { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pl-bref > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pl-bref i { grid-row: span 2; font-size: 20px; color: #2f9e44; }
.pl-bref small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.pl-methode-ouverte ul { margin: 0; }

/* Plantayo en plein écran (plantayo.php) : en-tête du site, puis la scène 3D à gauche
   et le panneau du jardin à droite, qui prennent toute la hauteur restante. */
.pl-plein-page { display: flex; flex-direction: column; height: 100vh; margin: 0; overflow: hidden; background: #1d2230; }
.pl-plein-page > header { flex: none; }
.pl-plein { --ink: #1d2230; --muted: #5d6475; --line: #e6e4de; --paper: #faf8f4; --dark: #1d2230;
  flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 30vw, 460px); margin: 0; padding: 0; }
.pl-scene { position: relative; min-height: 0; }
.pl-plein .pl-3d { position: absolute; inset: 0; height: auto; margin: 0; border: 0; border-radius: 0; }
.pl-plein .pl-vide { position: absolute; inset: 0; height: auto; border-radius: 0; }
.pl-cote { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 16px 18px 28px; color: var(--ink); background: var(--paper); border-left: 1px solid #2e3550; }
.pl-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 10px; margin-bottom: 12px; }
.pl-tete h1 { margin: 0; font-family: Fraunces, Georgia, serif; font-size: 24px; }
.pl-tete h1 i { color: #2f9e44; }
.pl-liens { font-size: 13px; }
.pl-liens a { color: #2b8a3e; }
.pl-plein .pl-prompt { flex: 1 1 100%; }
.pl-plein .api-prompt input[type=text] { min-width: 0; }
.pl-plein .pl-panneau { max-height: none; overflow: visible; padding-right: 0; margin-top: 4px; }

/* Téléphone et tablette étroite : la 3D en haut, le panneau dessous, la page défile */
@media (max-width: 900px) {
  .pl-plein-page { height: auto; overflow: visible; }
  .pl-plein { display: block; }
  .pl-scene { height: 62vh; }
  .pl-cote { border-left: 0; border-top: 1px solid #2e3550; overflow: visible; }
}
/* Menus déroulants de l'en-tête au-dessus de la 3D */
.pl-plein-page > header { z-index: 3000; }
.pl-plein .pl-vide { align-content: center; }
/* Lien vers la fiche d'une essence (includes/fiche-espece.js) */
.pl-fiche { padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: #2b8a3e; background: none; border: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pl-arbres .pl-fiche { margin-left: 6px; padding: 0; font-size: 11px; font-weight: 400; color: #2b8a3e; background: none; border-radius: 0; }
/* Vue « Carte » (Leaflet, photo aérienne IGN) à la place de la 3D */
.pl-vues { position: absolute; z-index: 1100; top: 12px; left: 50%; transform: translateX(-50%); display: flex; padding: 3px; background: rgba(15, 19, 32, .86); border: 1px solid #2e3550; border-radius: 999px; }
.pl-vues button { padding: 5px 14px; font: inherit; font-size: 12px; font-weight: 600; color: #e6e9f2; background: none; border: 0; border-radius: 999px; cursor: pointer; }
.pl-vues button.actif { color: #0f1320; background: #8ce99a; }
.pl-plan { position: absolute; inset: 0; z-index: 1000; background: #1d2230; }
.pl-plan[hidden] { display: none; }
.pl-plan-actions { display: grid; gap: 4px; }
.pl-plan-actions a { display: flex !important; align-items: center; justify-content: center; color: #333; cursor: pointer; }
.pl-plan-actions a.actif { color: #2b8a3e; background: #ebfbee; }
.pl-plan-ici { position: absolute; z-index: 1001; bottom: 72px; left: 50%; transform: translateX(-50%); }
.pl-plan-ici[hidden] { display: none; }
.pl-plan-ici button { box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.pl-plan .leaflet-container, .pl-plan.leaflet-container { font: inherit; }
.pl-plan.pl-planter-curseur, .pl-plan.pl-planter-curseur .leaflet-interactive { cursor: crosshair !important; }
.pl-plan path.pl-arbre-carte { cursor: grab; }
.pl-plan.pl-glisse, .pl-plan.pl-glisse path.pl-arbre-carte { cursor: grabbing !important; }

/* Attente sur la scène (styles communs : .sol-attente de solaryo.css) : un arbre pousse, puis se balance au vent */
.pl-attente-arbre { width: 96px; height: 96px; margin-bottom: 4px; overflow: visible; }
.pl-attente-sol { fill: #2e3550; }
.pl-attente-tronc { fill: #a87148; }
.pl-attente-couronne circle { fill: #2f9e44; }
.pl-attente-couronne .pl-attente-clair { fill: #69db7c; opacity: .8; }
.pl-attente-pied, .pl-attente-tronc, .pl-attente-couronne { transform-box: fill-box; }
.pl-attente-pied { transform-origin: 50% 100%; animation: pl-attente-vent 3.2s ease-in-out 2.4s infinite; }
.pl-attente-tronc { transform-origin: 50% 100%; animation: pl-attente-tronc 1.2s ease-out both; }
.pl-attente-couronne { transform-origin: 50% 80%; animation: pl-attente-couronne 1.4s cubic-bezier(.34, 1.4, .64, 1) .9s both; }
@keyframes pl-attente-tronc { from { transform: scaleY(0); } }
@keyframes pl-attente-couronne { from { transform: scale(0); } }
@keyframes pl-attente-vent { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(3.5deg); } 65% { transform: rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .pl-attente-pied, .pl-attente-tronc, .pl-attente-couronne { animation: none; } }
.pl-vide-ouvrir { display: block; margin: 14px auto 0; padding: 8px 18px; font: inherit; font-weight: 600; color: #0f1320; background: #40c057; border: 0; border-radius: 999px; cursor: pointer; }
.pl-vide-ouvrir:hover { background: #51cf66; }
.pl-vide-ouvrir i { color: inherit; font-size: inherit; }

/* Barre du temps sur la scène (3D et carte) : faire grandir ou rapetisser les arbres */
.pl-temps-scene { position: absolute; z-index: 1100; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  width: min(480px, calc(100% - 24px)); padding: 5px 12px 5px 5px; color: #e6e9f2; background: rgba(15, 19, 32, .86); border: 1px solid #2e3550; border-radius: 999px; }
.pl-temps-scene[hidden] { display: none; }
.pl-temps-scene button { flex: none; min-width: 30px; height: 30px; padding: 0 8px; font: inherit; font-size: 12px; font-weight: 600; color: #e6e9f2; background: #2e3550; border: 0; border-radius: 999px; cursor: pointer; }
.pl-temps-scene button:hover { background: #3b4466; }
.pl-temps-scene .pl-lecture { color: #0f1320; background: #8ce99a; }
.pl-temps-scene .pl-lecture:hover { background: #b2f2bb; }
.pl-temps-scene input[type=range] { flex: 1; min-width: 60px; accent-color: #8ce99a; }
.pl-temps-annee { flex: none; min-width: 112px; font-size: 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .pl-temps-annee { min-width: 0; } .pl-temps-scene [data-pas] { display: none; } }

/* Emplacement de l'arbre choisi : espace disponible, essences envisagées */
.pl-emplacement { margin: 10px 0; padding: 10px; background: #f8f9fa; border: 1px solid #d0ebff; border-radius: 10px; }
.pl-emplacement[hidden] { display: none; }
.pl-emplacement h4 { margin: 0 0 8px; }
.pl-emplacement .pl-carte { background: #e7f5ff; }
.pl-emplacement .pl-carte b { color: #1864ab; }
.pl-envisagees { margin-top: 10px; }
.pl-envisagees tbody tr { cursor: default; }
.pl-envisagees tr.plantee td { background: #fff9db; }
.pl-envisagees td b { font-weight: 600; }
.pl-envisagees-actions { white-space: nowrap; text-align: right !important; }
.pl-envisagees-actions button { margin-left: 4px; padding: 1px 8px; font: inherit; font-size: 11px; border: 0; border-radius: 999px; cursor: pointer; }
.pl-essayer { color: #fff; background: #2f9e44; }
.pl-retirer { color: #fff; background: #868e96; }
.pl-tient { color: #2b8a3e; font-weight: 600; }
.pl-sort { color: #e8590c; }
.pl-depasse { color: #c92a2a; font-weight: 600; }
.pl-ajouter { margin-top: 8px; font-size: 12px; padding: 5px 12px; }
.sol-reco-garder { padding: 0 6px; font-size: 16px; line-height: 1; color: #f59f00; background: none; border: 0; cursor: pointer; }
.sol-reco-garder.garde { color: #f08c00; }
/* Filtres du menu des essences : arbre ou arbuste, port */
.pl-filtres-espece { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.pl-filtres-espece select { flex: 1 1 140px; min-width: 0; padding: 5px 8px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
/* La barre du temps occupe le bas de la scène : la légende de la 3D et les contrôles du bas
   de la carte (échelle, attribution) passent au-dessus */
.pl-scene .sol-3d-legend { bottom: 60px; }
.pl-plan .leaflet-bottom { bottom: 52px; }
@media (max-width: 600px) {
  .pl-scene .sol-3d-legend { left: 8px; padding: 6px 10px; font-size: 11px; }
  .pl-scene .sol-3d-legend i { width: 150px; }
  /* Panneau des réglages de la 3D sous le choix 3D / Carte, au-dessus de la légende */
  .pl-scene .sol-3d-panneau { top: 56px; right: 8px; }
  .pl-scene .sol-3d-panneau:not(.replie) { max-height: calc(100% - 200px); }
}
