/* ══════════════════════════════════════════════════════════════
   ac_datagrid_pro.css — Styles page produit ac_datagrid_pro
   ══════════════════════════════════════════════════════════════ */

/* Hero */
.hero-badge {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Accroche */
.accroche-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.accroche-lead {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.demo-warning {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Variante info (bleu) pour les warnings de type "information technique" */
.demo-warning-info {
    margin-top: 8px;
    background: #e0f0ff;
    color: #1a4a7a;
    border-left: 3px solid #2563eb;
    padding: 8px 16px;
    border-radius: 0 6px 6px 0;
}

/* Contrôles démo */
.demo-controls-bar {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.control-group select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

/* Bouton "Recharger la grille" dans la barre de contrôles */
.btn-recharger {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Section grille */
.grille-section {
    padding: 30px 0;
}

/* Console de log */
.log-section {
    padding: 20px 0 40px;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.log-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--navy);
}

.btn-clear-log {
    padding: 4px 12px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-main);
}

.btn-clear-log:hover {
    background: #b91c1c;
}

.test-log {
    background: #1e1e1e;
    color: #0f0;
    padding: 12px 16px;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--border-dark);
}

.test-log .log-error { color: #f44; }
.test-log .log-event { color: #4af; }
.test-log .log-info  { color: #aaa; }
.test-log .log-crud  { color: #4f4; }

/* Fonctionnalités */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

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

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(26, 38, 64, 0.1);
}

.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.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 300;
}

/* Comparaison */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.compare-card {
    padding: 30px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.compare-others {
    background: #f8f8f8;
    border: 1px solid var(--border);
}

.compare-artisan {
    background: var(--bg-light);
    border: 1px solid var(--border);
}

.compare-card h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.compare-card p {
    font-weight: 300;
}

/* Intégration */
.integration-steps {
    max-width: 800px;
    margin: 0 auto;
}

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

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

.step-content h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    line-height: 1.5;
    white-space: pre;
}

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

.achat-card h2 {
    margin-bottom: 8px;
}

.achat-ttc {
    font-size: 0.8rem;
    color: #999;
    font-weight: 400;
}

.achat-licence {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
}

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

.achat-includes ul {
    margin-left: 20px;
    margin-top: 8px;
}

.achat-includes li {
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 300;
}

.achat-includes code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}

.btn-achat {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.achat-note {
    font-size: 0.85rem;
    color: #999;
    font-weight: 300;
}

/* Doc */
.doc-download {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-doc {
    display: inline-block;
    padding: 12px 24px;
    background: var(--navy);
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-doc:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .compare-grid {
        grid-template-columns: 1fr;
    }

    .demo-controls-bar {
        flex-direction: column;
        align-items: center;
    }

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

/* ── Badges connecteurs (Cinéma / PHP / Laravel) ────────── */
.demo-connector-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.demo-connector-cinema {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.demo-connector-php {
    background: #f0f1ff;
    border: 1px solid #a5a8fc;
}

.demo-connector-laravel {
    background: #fff1f0;
    border: 1px solid #fca5a5;
}

.connector-logo {
    width: 32px;
    height: auto;
    flex-shrink: 0;
}

.connector-label {
    color: var(--text);
    font-size: 0.95rem;
}

.connector-label strong {
    color: var(--navy);
}

/* Badge "Laravel" dans le titre de la console */
.log-badge-laravel {
    display: inline-block;
    background: #FF2D20;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Bouton "Commander" dans le footer du bloc code source */
.btn-commander-footer {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* Séparateur entre les démos */
.demo-separator-section {
    padding: 10px 0 0;
}

.demo-separator {
    display: flex;
    align-items: center;
    gap: 16px;
}

.demo-separator::before,
.demo-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.demo-separator-label {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Bloc code source Laravel ──────────────────────────── */
.code-source-section {
    padding: 10px 0 30px;
}

.code-source-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.code-source-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--navy);
    flex-wrap: wrap;
    gap: 10px;
}

.code-source-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.code-source-title svg {
    color: var(--accent);
    flex-shrink: 0;
}

.code-source-tabs {
    display: flex;
    gap: 4px;
}

.code-tab {
    padding: 5px 14px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 4px;
    background: transparent;
    color: rgba(255,255,255,.6);
    font-size: 0.8rem;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    cursor: pointer;
    transition: all .15s;
}

.code-tab:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.code-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.code-panel {
    display: none;
}

.code-panel.active {
    display: block;
}

.code-panel .code-block {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-left: 3px solid var(--accent);
    font-size: 0.82rem;
    max-height: 380px;
    overflow-y: auto;
}

/* Coloration syntaxique PHP */
.php-comment { color: #6a9955; font-style: italic; }
.php-keyword  { color: #c586c0; }
.php-string   { color: #ce9178; }
.php-class    { color: #4ec9b0; }
.php-fn       { color: #dcdcaa; }

.code-source-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 10px;
}

.code-source-footer strong {
    color: var(--text);
}

@media (max-width: 768px) {
    .code-source-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Bouton vidéo hero ──────────────────────────────────── */
.hero-actions {
    margin-top: 24px;
}

.btn-video {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255,255,255,.15);
    border: 2px solid rgba(255,255,255,.5);
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all .2s ease;
}

.btn-video:hover {
    background: rgba(255,255,255,.25);
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-video svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.btn-video-duree {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 400;
    margin-left: 4px;
}

/* ── Lightbox vidéo ─────────────────────────────────────── */
.video-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: center;
    justify-content: center;
}

.video-lightbox.open {
    display: flex;
}

.video-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
}

.video-lightbox-content {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 1200px;
}

.video-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity .15s;
}

.video-lightbox-close:hover {
    opacity: 1;
}

.video-lightbox-player {
    width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    display: block;
}

/* ── Log perf console ───────────────────────────────────── */
.log-perf { color: #0ea5e9; font-weight: 700; font-family: monospace; }
