/**
 * PicToSpot – Frontend Stylesheet
 * --------------------------------
 * Version : 1.2.0
 * Auteur  : Christophe Delire
 * Palette : #F4A024 (orange) / #37424A (bleu-gris) / #3F8652 (vert) / #F5F5F5 (gris clair)
 * Typo    : Poppins / System Sans-serif
 */

:root {
    --ps-orange: #F4A024;
    --ps-blue:   #37424A;
    --ps-green:  #3F8652;
    --ps-light:  #F5F5F5;
    --ps-white:  #FFFFFF;
}

/* --- Structure générale --- */
.pictospot-show,
.pictospot-map-wrapper,
.pictospot-um-tab {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    color: var(--ps-blue);
    line-height: 1.6;
    margin: 2em auto;
    max-width: 900px;
    background: var(--ps-white);
    border-radius: 14px;
    padding: 2em;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

/* --- Titres --- */
.pictospot-show h2,
.pictospot-map-wrapper h2 {
    color: var(--ps-blue);
    border-left: 5px solid var(--ps-orange);
    padding-left: 12px;
    margin-bottom: 1.2em;
    font-weight: 600;
}

/* --- Image principale --- */
.pictospot-img img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1.5em;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* --- Description --- */
.pictospot-desc {
    font-size: 1rem;
    color: var(--ps-blue);
    margin-bottom: 1.8em;
}

/* --- QR Code --- */
.pictospot-qr {
    text-align: center;
    margin: 1.5em 0;
}
.pictospot-qr h4 {
    font-weight: 600;
    color: var(--ps-blue);
    margin-bottom: 0.6em;
}
.pictospot-qrcode {
    width: 190px;
    height: 190px;
    border: 5px solid var(--ps-orange);
    padding: 10px;
    border-radius: 14px;
    background: var(--ps-white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* --- Carte --- */
.pictospot-map {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin: 1.8em 0;
}

/* --- Boutons --- */
.pictospot-actions {
    text-align: center;
    margin-top: 2em;
}

.pictospot-actions a.button,
#picpic-form button {
    background: var(--ps-green);
    color: var(--ps-white);
    border: none;
    padding: 0.8em 1.6em;
    border-radius: 8px;
    font-size: 1rem;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.pictospot-actions a.button:hover,
#picpic-form button:hover {
    background: var(--ps-orange);
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

/* --- Formulaire upload --- */
#picpic-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: flex-start;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

#picpic-form label {
    font-weight: 600;
    color: var(--ps-blue);
}

#picpic-form input[type="file"] {
    border: 2px dashed var(--ps-orange);
    padding: 1.2em;
    width: 100%;
    border-radius: 10px;
    background: var(--ps-light);
    cursor: pointer;
    color: var(--ps-blue);
    transition: border-color 0.2s, background 0.2s;
}
#picpic-form input[type="file"]:hover {
    border-color: var(--ps-green);
    background: #fff;
}

#picpic-result img {
    margin-top: 1em;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* --- Messages --- */
.pictospot-msg,
.pictospot-error {
    padding: 1em;
    border-radius: 8px;
    font-weight: 500;
    margin-top: 1em;
}
.pictospot-msg {
    background: var(--ps-light);
    color: var(--ps-blue);
    border-left: 4px solid var(--ps-green);
}
.pictospot-error {
    background: #ffeaea;
    color: #c00;
    border-left: 4px solid #c00;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .pictospot-show,
    .pictospot-map-wrapper {
        padding: 1.4em;
    }
    .pictospot-qrcode {
        width: 150px;
        height: 150px;
    }
    .pictospot-actions a.button {
        font-size: 0.95rem;
        padding: 0.7em 1.4em;
    }
}
.pictospot-fallback {
  text-align: center;
  padding: 3em 1em;
}
.pictospot-empty-logo {
  width: 80px;
  animation: pulse 2s infinite ease-in-out;
  margin-bottom: 1em;
}
@keyframes pulse {
  0%,100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.pictospot-fallback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
}
.pictospot-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.pictospot-card:hover {
  transform: translateY(-4px);
}
.pictospot-card h3 {
  font-size: 1rem;
  color: var(--ps-blue);
  padding: 0.8em;
}
.pictospot-card-img img {
  width: 100%;
  display: block;
}
/* Rangée de boutons – fallback PicToSpot */
.pictospot-fallback-buttons {
  text-align: center;
  margin-top: 2em;
}

.pictospot-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  margin-top: 1em;
}

.pictospot-btn {
  background: var(--ps-green, #3F8652);
  color: #fff;
  padding: 0.8em 1.5em;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  white-space: nowrap;
}

.pictospot-btn:hover {
  background: var(--ps-orange, #F4A024);
  transform: translateY(-2px);
}
/* --- Fallback Page (Accueil par défaut) --- */
.pictospot-fallback {
    text-align: center;
    padding: 3em 1em;
    color: #2a2a2a;
}

.pictospot-empty-logo {
    width: 120px;
    margin: 0 auto 1.5em;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.pictospot-fallback h2 {
    font-family: "Poppins", sans-serif;
    font-size: 1.9em;
    font-weight: 600;
    margin-bottom: 0.3em;
    color: #37424A;
}

.pictospot-fallback p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 2em;
}

/* --- Bouton principal (Voir la carte) --- */
.pictospot-fallback .button {
    display: inline-block;
    background: #2E8B57;
    color: white;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.9em 1.6em;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
.pictospot-fallback .button:hover {
    background: #256b43;
    transform: translateY(-2px);
}

/* --- Section des boutons de spots --- */
.pictospot-fallback-buttons {
    margin-top: 3em;
}

.pictospot-button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}


.pictospot-btn {
    background: #2E8B57;
    color: #fff;
    padding: 0.9em 1.3em;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1em;
    min-width: 130px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}
.pictospot-btn:hover {
    background: #256b43;
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 600px) {
    .pictospot-btn {
        width: 100%;
    }
}
/* === PicToSpot Upload Form === */
form[id^="picpic-form-"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px;
    background: #f9fafb;
    border: 2px dashed #ccc;
    border-radius: 12px;
    max-width: 420px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.2s ease-in-out;
}

form[id^="picpic-form-"]:hover {
    border-color: #2E8B57;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

form[id^="picpic-form-"] label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

form[id^="picpic-form-"] input[type="file"] {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    width: 100%;
    cursor: pointer;
}

form[id^="picpic-form-"] button {
    background: linear-gradient(90deg, #2E8B57, #256b43);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

form[id^="picpic-form-"] button:hover {
    background: linear-gradient(90deg, #256b43, #2E8B57);
}

#picpic-result-[id] {
    margin-top: 20px;
    text-align: center;
}

#picpic-result-[id] img {
    margin-top: 10px;
    border: 4px solid #eee;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

