 :root {
    --font-pixel: 'VT323', monospace;
    --font-body: Arial, sans-serif;
    --color-primary: #27ae60;
    --color-danger: #c0392b;
    --color-info: #2980b9;
    --color-border: #797878;
    --color-bg: #f3f5f7;
    --border-dark: #797878; 

    /* Échelle typographique cohérente (ratio ~1.18×) */
    --text-xs:    0.85rem;
    --text-sm:    0.95rem;
    --text-base:  1.1rem;
    --text-lg:    1.3rem;
    --text-xl:    1.6rem;
    --text-2xl:   2rem;
}

/* Classes utilitaires de taille (mutualisables sur toutes les pages) */
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }


/* Titres des sections (Profil, Commandes, Login) */
.login-panel h2, 
.section-title, 
.header-container h1 {
    font-family: var(--font-pixel);
    text-transform: uppercase;
}

/* Labels des formulaires */
.form-group label {
    font-family: var(--font-pixel);
    font-size: 1.2rem; 
    letter-spacing: 1px;
    color: #333;
}

/* Champs de saisie (Inputs) */
.login-panel input[type="email"],
.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body); /* On garde une police lisible pour la saisie */
    font-size: 1rem;
}

/* Boutons */
.btn-magic, 
.btn-save-profile, 
.btn-back {
    font-family: var(--font-pixel);
    font-size: 1.3rem;
    text-transform: uppercase;
}

/* Messages d'erreur ou d'info */
#login-msg, 
#profile-msg {
    font-family: var(--font-body);
    font-size: 0.9rem;
}

/* ── FORMULAIRES GLOBAUX (Standards Boutique) ── */

/* Conteneur de groupe (Label + Input) */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Labels en style Pixel */
.form-group label {
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #333;
}

/* Style des champs de saisie (Inputs, Selects, Textareas) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    /* Bordure fine (1px) et couleur grise */
    border: 1px solid #ccc; 
    /* Angles légèrement arrondis */
    border-radius: 5px; 
    font-family: 'Segoe UI', sans-serif; /*font-family: var(--font-body);*/
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Effet au survol/focus pour rappeler le côté interactif */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary); /* Vert Minecraft au focus */
    box-shadow: 3px 3px 0px rgba(39, 174, 96, 0.2);
}

/* Style des champs désactivés (ex: email dans account) */
input:disabled {
    background-color: #eee !important;
    color: #888 !important;
    cursor: not-allowed;
    border-style: dashed;
}

/* Petites variantes de mise en page */
.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.full-width {
    width: 100%;
}

 h1 {
            font-family: 'VT323', monospace;
            font-size: 3.5em; /* On augmente la taille car les polices pixel sont souvent petites */
            text-transform: uppercase;
            letter-spacing: 2px;
            color: #333;
            text-shadow: 3px 3px 0px #bbb; /* Ombre grise pour l'effet relief pixel */
            margin: 0;
     }

        body {
            background-image: url('/ressources/bg-cubes.svg');
            background-repeat: repeat;
            background-color: #ffffff;
            background-attachment: fixed;
            background-attachment: fixed;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: #333;
            margin: 0;
            padding: 20px;
        }

        /* --- Style commun pour les conteneurs --- */
        .container, .header-container {
            max-width: 1200px;
            margin: 0 auto;
            background-color: rgba(255, 255, 255, 0.9);
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        }

        /* ---Espacement spécifique pour le header --- */
        .header-container {
            margin-bottom: 20px; /* Espace entre le header et le contenu */
            text-align: center;
        }

        .header-container h1 {
            margin: 0;
            font-size: 2.5em;
        }

        .subtitle {
            margin-top: 10px;
            font-size: 1.1rem;
            color: #666;
            font-style:normal;
            text-align: center;            
            transition: max-height 0.3s ease-out;
            overflow: hidden;
        }

        .btn-chevron {
        display: block;
        margin-left: auto;
        cursor: pointer;
        border: 1px solid #ccc;
        font-family: var(--font-pixel);
        font-size: 1.5rem;
        padding: 2px 10px;
        margin-top: 5px;
        
        /* Animation fluide */
        transition: transform 0.3s ease;
        
        /* On définit l'état de base (ouvert) */
        transform: rotate(0deg); 
        }

        /* La classe ajoutée par le JS pour retourner la flèche */
        .btn-chevron.chevron-rotated {
            transform: rotate(180deg) !important;
        }

        .search-section {
            margin-bottom: 30px;
            display: flex;
            justify-content: center;
        }

        #cube-search {
            width: 100%;
            max-width: 500px;
            padding: 12px 20px;
            font-size: 1rem;
            border: 2px solid #eee;
            border-radius: 25px;
            outline: none;
            transition: border-color 0.3s ease;
        }

        #cube-search:focus {
            border-color: #007bff;
        }

        #inventory-container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
        }

        .cube-card { 
            background: white; 
            border-radius: 8px; 
            padding: 15px; 
            box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
            width: 220px;
            border: 1px solid #f0f0f0;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 380px;
            overflow: hidden;
        }


        .card-actions {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex-wrap: nowrap;
        }

        .card-actions .price {
            white-space: nowrap;
        }

        .price { color: #2ecc71; font-weight: bold; font-size: 1.2em; }
        
        button {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 10px;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.2s;
        }

        button:hover { background-color: #0056b3; }

        footer {
            margin-top: 50px;
            padding: 20px 0;
            color: #666;
            font-size: 0.9em;
            text-align: center;
        }

        /* ── Lien Instagram (header + footer), sobre & discret ── */
        .insta-link {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: #666;
            text-decoration: none;
            font-size: 0.9em;
            line-height: 1;
            transition: color 0.2s ease;
        }

        .insta-link svg {
            width: var(--text-base);  /* 1.1rem — même hauteur que le texte de base */
            height: var(--text-base);
            flex-shrink: 0;
        }

        .insta-link:hover,
        .insta-link:focus-visible {
            color: #c13584; /* teinte Instagram, révélée seulement au survol */
        }

        /* Espacement propre uniquement lorsque le lien est dans le footer */
        .footer-content .insta-link {
            margin-top: 12px;
        }

.description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
    margin: 10px 0;
    /* Limite à 3 lignes pour garder l'alignement */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.stock-status {
    font-size: 0.85em;
    font-weight: bold;
}

.in-stock { color: #27ae60; }
.out-of-stock { color: #e74c3c; }

.btn-disabled {
    background-color: #bdc3c7 !important;
    cursor: not-allowed !important;
}

.cube-card {
    display: flex;
    flex-direction: column; /* On empile les éléments verticalement */
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 250px;
    min-height: 300px; /* On fixe une hauteur mini pour l'harmonie */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card-header {
    flex-shrink: 0;
}

h3 {
    text-align: center; /* Centrage du motif */
    margin-bottom: 15px;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1; /* Occupe tout l'espace entre le carrousel et le bas de la carte */
    padding: 10px;
    justify-content: space-between; /* Aide à la répartition si besoin */
}

.description {
    font-size: 0.9em;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limite à 4 lignes de texte */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto; /* Pousse automatiquement le footer vers le bas du card-body */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Pour aligner les labels à gauche et les valeurs à droite sur la même ligne */
.info-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    margin: 5px 0;
}

.price {
    text-align: right;
    font-size: 1.0em;
    margin: 10px 0;
    color: #2ecc71;
    font-weight: bold;
}


/* Barre d'action centrée */
.add-to-cart-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Espace entre l'input et le bouton */
}

/* Style de l'input de quantité */
.qty-input {
    width: 80px !important;
    padding: 8px 4px; 
    border: 2px solid #eee;
    border-radius: 4px;
    text-align: center;
    outline: none;
    box-sizing: content-box;
}

.qty-input:focus {
    border-color: #007bff;
}

.btn-command {
    width: auto;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-command:hover:not(:disabled) {
    background-color: #0056b3;
}

.btn-disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-grid textarea {
    grid-column: span 2;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 4px;
}

.form-grid input {
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 4px;
}

.btn-edit { background: #f1c40f; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.btn-delete { background: #e74c3c; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.btn-back { text-decoration: none; color: #007bff; font-weight: bold; }


.text-order-link {
            display: block;
            text-align: center;
            font-size: 0.85rem;
            color: #7f8c8d;
            text-decoration: none;
            margin-bottom: 12px;
            padding: 5px;
            border: 1px dashed #bdc3c7;
            transition: all 0.2s;
        }

.image-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #eee;
     border: 1px solid var(--border-dark);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    object-fit:cover; display:block; cursor:pointer;
    
}

.product-image:hover {
    transform: scale(1.05); /* Petit effet de zoom au survol sympa */
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(192, 57, 43, 0.9);
    color: white;
    padding: 2px 8px;
    font-family: 'VT323';
    font-size: 1rem;
}



/* Carrousel Container */
/* Widget panier sidebar — mutualisé index.html + panier.html */
.cart-img-small { width: 30px; height: 30px; object-fit: cover; flex-shrink: 0; }


/* Widget panier — style partagé index.html + cube.html */
.cart-sidebar {
    background: var(--color-bg);
    padding: 10px;
    color: #000;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
}

.cart-item-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 10px;
    border-bottom: 1px dashed #7f8c8d;
    padding-bottom: 8px;
    font-size: 0.9rem;
}

.item-motif {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 5px;
}

.item-total-price {
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #e0e0e0;
    padding: 2px 4px;
    border-radius: 3px;
}

.btn-qty {
    background: #bdb8a6;
    border: none;
    cursor: pointer;
    font-family: 'VT323';
    font-size: 1rem;
    padding: 0 5px;
    line-height: 1;
}

.cart-footer {
    margin-top: 15px;
    border-top: 1px solid #797878;
    padding-top: 10px;
    text-align: right;
}

.cart-footer p {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 10px 0;
}

/* --- Style du lien panier dans le header --- */
/* ── Bouton "Mon panier" dans le header ── */
.cart-link-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    line-height: 1;
    border: none;
    border-radius: 4px;                  
    box-shadow: 1px 1px 0px #555;       
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cart-link-mini:hover {
    background-color: #0056b3;
    box-shadow: 2px 2px 0px #111;
    transform: translate(1px, 1px);
    text-decoration: none;
}

.cart-link-mini:active {
    box-shadow: 0 0 0 #000;
    transform: translate(4px, 4px);
}

/* Séparateur visuel entre "🛒" et le compteur, seulement quand y a quelque chose */
#header-cart-count:not(:empty)::before {
    content: '·';
    margin: 0 6px 0 2px;
    opacity: 0.7;
}

#header-cart-count:not(:empty) {
    font-weight: bold;
}

/* ── Badge "promo bonus quantité" — boutique publique ─────────────── */
.bonus-banner {
    font-family: var(--font-pixel);
    color: #b35400;
    background: #fff4e6;
    border: 1px dashed #e67e22;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

/* Variante carte (index.html) : compact, centré */
.cube-card .bonus-banner:not([hidden]) {
    display: block;
    width: fit-content;
    margin: 6px auto;
    padding: 3px 10px;
    font-size: 0.95rem;
    text-align: center;
}

/* Variante page détail (cube.html) : plus généreux */
.cube-detail-info .bonus-banner:not([hidden]) {
    display: block;
    margin: 16px 0;
    padding: 8px 14px;
    font-size: 1.15rem;
}

.bonus-banner__hint {
    display: block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: #8c5a2b;
    letter-spacing: 0;
    margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════════════════
 *  Admin Gestionnaire des commandes — Visualiseur JSON brut
 * ════════════════════════════════════════════════════════════════════════ */

.order-raw-json {
    /* #modal-body est une grille 2 colonnes : on force la pleine largeur
       pour que le panneau s'affiche sous les 4 zones existantes. */
    grid-column: 1 / -1;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fbfbfb;
}

.order-raw-json > summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    user-select: none;
    list-style-position: inside;
}

.order-raw-json[open] > summary {
    border-bottom: 1px solid var(--color-border);
}

/* Barre des boutons Copier / Télécharger */
.order-raw-json__actions {
    display: flex;
    gap: 8px;
    padding: 10px 14px 0;
}

/* Bloc de code JSON (thème sombre pour lisibilité) */
.order-raw-json__code {
    margin: 10px 14px 14px;
    padding: 12px;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    max-height: 380px;
    overflow: auto;
    white-space: pre;
    tab-size: 2;
}

/* Coloration syntaxique (classes posées par highlightJson) */
.order-raw-json__code .oj-key  { color: #9cdcfe; }  /* clés      */
.order-raw-json__code .oj-str  { color: #ce9178; }  /* chaînes   */
.order-raw-json__code .oj-num  { color: #b5cea8; }  /* nombres   */
.order-raw-json__code .oj-bool { color: #569cd6; }  /* booléens  */
.order-raw-json__code .oj-null { color: #569cd6; }  /* null      */