/* Structure principale */
#gtb-vinci-root {
    background-color: #0b1120;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #1e293b;
    color: #f8fafc;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

/* En-tête */
.gtb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #1e293b;
    padding-bottom: 15px;
}

.gtb-title {
    margin: 0;
    color: #00f2ff;
    letter-spacing: 2px;
    font-weight: 700;
}

.gtb-btn-admin {
    background: transparent;
    border: 1px solid #00f2ff;
    color: #00f2ff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s;
}

.gtb-btn-admin:hover {
    background: #00f2ff;
    color: #0b1120;
}

/* Grille des tuiles */
.gtb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* Les Tuiles */
.gtb-tile {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.gtb-tile-header {
    background: #1e293b;
    padding: 12px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #cbd5e1;
    text-align: center;
    border-bottom: 1px solid #334155;
}

.gtb-tile-body {
    padding: 30px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

/* Valeurs et Icônes */
.gtb-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00f2ff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

.gtb-svg {
    width: 80px;
    height: 80px;
}

/* Pied de tuile (Statut) */
.gtb-tile-footer {
    padding: 10px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.status-on {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-top: 1px solid rgba(34, 197, 94, 0.2);
}

/* Animations SVG */
.anim-spin {
    animation: spin 2s linear infinite;
}

.anim-vibrate {
    animation: vibrate 0.3s linear infinite both;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes vibrate {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

/* Formulaire d'inscription */
.gtb-reg-container {
    background: #0f172a;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #334155;
    max-width: 450px;
    margin: 40px auto;
}

.gtb-reg-container .field {
    margin-bottom: 20px;
}

.gtb-reg-container label {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.gtb-reg-container input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    color: white;
    padding: 12px;
    border-radius: 6px;
}

.gtb-reg-container button {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 15px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

/* Mode Edition */
.gtb-drag-handle, .gtb-delete-tile {
    display: none;
    cursor: pointer;
}
.gtb-delete-tile {
    float: right;
    background: transparent;
    border: none;
    color: #ff4d4d;
    font-size: 1.2rem;
    font-weight: bold;
}
.gtb-drag-handle {
    float: left;
    color: #94a3b8;
    margin-right: 10px;
}

.gtb-edit-active .gtb-tile {
    border: 1px dashed #00f2ff;
    animation: pulse-border 2s infinite;
}
.gtb-edit-active .gtb-drag-handle, 
.gtb-edit-active .gtb-delete-tile {
    display: inline-block;
}

@keyframes pulse-border {
    0% { border-color: #334155; }
    50% { border-color: #00f2ff; }
    100% { border-color: #334155; }
}

/* Modale */
.gtb-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 8, 23, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.gtb-modal-content {
    background: #0f172a;
    border: 1px solid #334155;
    padding: 25px;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}
.gtb-modal-content h4 {
    margin-top: 0;
    color: #00f2ff;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 10px;
}
.gtb-field { margin-bottom: 15px; }
.gtb-field label { display: block; font-size: 0.8rem; margin-bottom: 5px; color: #94a3b8;}
.gtb-field input, .gtb-field select {
    width: 100%; padding: 10px; background: #1e293b; color: white;
    border: 1px solid #334155; border-radius: 4px;
}
.gtb-modal-actions {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px;
}
.gtb-btn-primary, .gtb-btn-secondary {
    padding: 10px 15px; border-radius: 4px; border: none; cursor: pointer; font-weight: bold;
}
.gtb-btn-primary { background: #2563eb; color: white; }
.gtb-btn-secondary { background: #334155; color: white; }

/* Nouvelles Animations (Spa, Caméra, Serveurs, Pression) */
.anim-pulse-needle {
    animation: pulse-needle 1.5s ease-in-out infinite alternate;
}
@keyframes pulse-needle {
    0% { transform: rotate(-10deg); }
    100% { transform: rotate(20deg); }
}

.anim-wave {
    animation: wave 3s linear infinite;
}
@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-20px); }
}

.anim-bubbles {
    animation: bubbles 2s ease-in infinite;
}
@keyframes bubbles {
    0% { transform: translateY(10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-20px); opacity: 0; }
}

.anim-blink {
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.anim-pan {
    animation: pan 4s ease-in-out infinite alternate;
}
@keyframes pan {
    0% { transform: rotate(-20deg); }
    100% { transform: rotate(20deg); }
}

/* Effets interactifs pour le mode Édition */
.gtb-edit-active .gtb-tile {
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.gtb-edit-active .gtb-tile:hover {
    transform: scale(1.02);
    border-color: #3b82f6;
    background-color: #162032;
}

.gtb-edit-active .gtb-tile:active {
    transform: scale(0.98);
}
