/* ============================================
   AC_SIDEBAR.CSS — Page produit
   artisan-code.fr
   ============================================ */

/* Hero prix */
.hero-price {
    display: inline-block;
    background: rgba(247, 147, 30, 0.2);
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-left: 12px;
    vertical-align: middle;
}

/* ============================================
   ACCROCHE
   ============================================ */

.accroche-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.8;
}

.accroche-lead {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.accroche-content code {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.95em;
    color: var(--color-blue-dark);
}

/* ============================================
   CONTRÔLES DÉMO
   ============================================ */

.controls-section {
    padding: 20px 0 0;
}

.demo-controls-bar {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    background: var(--color-bg-light);
    padding: 20px 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-blue-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-opt {
    padding: 7px 13px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--color-blue-dark);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-opt:hover {
    border-color: var(--color-gold);
}

.btn-opt[aria-pressed="true"] {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: #fff;
    font-weight: 600;
}

/* ============================================
   CADRE DE DÉMO — confinement du position:fixed
   ============================================ */

.demo-section {
    padding: 30px 0 60px;
}

.ac-sidebar-demo-cadre {
    position: relative;
    height: 560px;
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #f7f8fa;
}

/* Confinement du position:fixed — uniquement pour les positions ancrées
   (gauche/droite/haut/bas). Un ancêtre avec transform crée un nouveau
   bloc englobant pour les descendants position:fixed : la sidebar de
   démo reste dans ce cadre au lieu de se positionner par rapport à la
   fenêtre entière — indispensable puisque la vraie navigation du site
   est, elle aussi, une instance ac_sidebar sur cette même page.
   En mode libre, ce confinement est volontairement retiré : la classe
   calcule le glisser-déposer par rapport à la fenêtre (comportement
   normal, celui du vrai site), donc le confiner ici recréerait un
   décalage entre le curseur et la sidebar. Elle flotte alors librement
   au-dessus de la page, comme en usage réel. */
.ac-sidebar-demo-cadre--confine {
    transform: translateZ(0);
}

.ac-sidebar-demo-contenu {
    padding: 24px 24px 24px 300px;
    font-size: 0.9rem;
    color: #777;
    transition: padding 0.2s ease;
}

.ac-sidebar-demo-contenu--droite {
    padding: 24px 300px 24px 24px;
}

.ac-sidebar-demo-contenu--haut {
    padding: 90px 24px 24px;
}

.ac-sidebar-demo-contenu--bas {
    padding: 24px 24px 90px;
}

.ac-sidebar-demo-contenu--libre {
    padding: 24px;
}

.ac-sidebar-demo-contenu h4 {
    color: var(--color-blue-dark);
    margin: 0 0 8px;
}

/* ============================================
   FONCTIONNALITÉS
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.feature-card {
    background: var(--color-bg-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(14, 46, 82, 0.08);
    border-color: var(--color-gold);
}

.feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    color: var(--color-blue-dark);
    display: block;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--color-blue-dark);
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

.feature-card code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
}

/* ============================================
   INTÉGRATION
   ============================================ */

.integration-steps {
    max-width: 700px;
    margin: 0 auto 40px;
}

.integration-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--color-gold);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--color-blue-dark);
}

.code-block {
    background: var(--color-blue-dark);
    color: #a8d8a8;
    padding: 15px 20px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: pre;
}

/* Table des options */
.integration-options {
    max-width: 800px;
    margin: 0 auto;
}

.integration-options h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--color-blue-dark);
}

.options-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.options-table th {
    background: var(--color-blue-dark);
    color: #fff;
    padding: 10px 15px;
    text-align: left;
    font-weight: 500;
}

.options-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.options-table tr:nth-child(even) td {
    background: var(--color-bg-light);
}

.options-table code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--color-blue-dark);
}

/* ============================================
   ACHAT
   ============================================ */

.achat-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-bg-light);
    border: 1px solid var(--color-gold);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.achat-card h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.achat-ttc {
    font-size: 0.9rem;
    font-weight: 400;
    color: #888;
}

.achat-licence {
    color: var(--color-gold);
    font-weight: 500;
    margin-bottom: 25px;
    font-size: 1rem;
}

.achat-includes {
    text-align: left;
    margin-bottom: 25px;
}

.achat-includes p {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-blue-dark);
}

.achat-includes ul {
    list-style: none;
    padding: 0;
}

.achat-includes li {
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
    font-size: 0.95rem;
    color: #444;
}

.achat-includes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
}

.achat-includes code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

.btn-achat {
    font-size: 1.1rem;
    padding: 14px 40px;
}

.achat-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #888;
}

/* ============================================
   DOCUMENTATION
   ============================================ */

.doc-download {
    text-align: center;
}

.btn-doc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    border: 1px solid var(--color-gold);
    border-radius: 6px;
    color: var(--color-gold);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.btn-doc:hover {
    background: var(--color-gold);
    color: var(--color-white);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-price {
        display: block;
        margin: 10px auto 0;
        width: fit-content;
    }

    .integration-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .code-block {
        font-size: 0.8rem;
    }

    .options-table {
        font-size: 0.8rem;
    }

    .options-table th,
    .options-table td {
        padding: 8px 10px;
    }

    .ac-sidebar-demo-cadre {
        height: 480px;
    }

    .ac-sidebar-demo-contenu {
        padding-left: 90px;
    }
}
