/*
Theme Name: Y'a pas de quoi
Theme URI: https://yapasdequoi.com
Author: Aymeric Bouillat
Author URI: https://yapasdequoi.com
Description: Thème WordPress sur mesure pour Y'a pas de quoi — Le lab. Suite d'outils SEO professionnels.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yapasdequoi
Tags: seo, tools, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ------------------------------------------------
   Design System Variables
   Charte graphique "Y'a pas de quoi — Le lab"
   ------------------------------------------------ */
:root {
    /* Charte graphique */
    --brand-teal:        #66b2b2;
    --brand-teal-light:  #e8f4f4;
    --brand-gold:        #fbb03b;
    --brand-gold-light:  #fef4e0;
    --brand-dark:        #004c4c;
    --brand-linen:       #f2f2f2;
    --brand-anthracite:  #333333;

    /* Couleurs sémantiques */
    --color-good:   #22c55e;
    --color-warn:   #f97316;
    --color-bad:    #ef4444;

    /* Palette neutre */
    --bg-body:       #f2f2f2;
    --bg-card:       #ffffff;
    --bg-card-alt:   #f1f5f9;
    --border-color:  #e2e8f0;
    --text-primary:  #0f172a;
    --text-secondary:#475569;
    --text-muted:    #94a3b8;

    /* Marketing */
    --hero-gradient: linear-gradient(135deg, var(--brand-dark) 0%, #006666 50%, var(--brand-teal) 100%);
    --section-padding: 3rem 0;
    --navbar-height: 72px;
}

/* ------------------------------------------------
   Corrections WordPress
   ------------------------------------------------ */

/* Admin bar + navbar fixe */
.admin-bar .site-navbar {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-navbar {
        top: 46px;
    }
}

/* Alignements WordPress */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Légendes WordPress */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1rem;
}

.wp-caption-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Images WordPress */
img {
    max-width: 100%;
    height: auto;
}

figure {
    margin: 0 0 1.5rem;
}

figcaption {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Pagination WordPress */
.pagination-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination-nav .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: all 0.2s;
}

.pagination-nav .page-numbers:hover {
    border-color: var(--brand-teal);
    color: var(--brand-dark);
}

.pagination-nav .page-numbers.current {
    background: var(--brand-dark);
    color: #fff;
    border-color: var(--brand-dark);
}

/* Contenu article */
.entry-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.entry-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
}

.entry-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.entry-content blockquote {
    border-left: 3px solid var(--brand-teal);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--brand-teal-light);
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.entry-content pre {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    overflow-x: auto;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.entry-content code {
    background: var(--bg-card-alt);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.88rem;
}

.entry-content pre code {
    background: none;
    padding: 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.entry-content th,
.entry-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.entry-content th {
    background: var(--bg-card-alt);
    font-weight: 600;
}

/* Formulaire de commentaires */
.comment-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 3px rgba(102, 178, 178, 0.25);
}

.comment-form .submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--brand-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    background: var(--brand-dark);
    color: #fff;
}

.comment-form .submit:hover {
    background: #006666;
    border-color: #006666;
}

/* Commentaires */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-body {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

.comment-meta {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.comment-author {
    font-weight: 600;
    color: var(--brand-dark);
}

.comment-metadata {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.comment-metadata a {
    color: var(--text-muted);
}

.comment-content p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.children {
    list-style: none;
    padding-left: 2rem;
}

/* ------------------------------------------------
   Blog — Layout & Composants
   ------------------------------------------------ */

/* Grille 2 colonnes */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Layout blog : contenu + sidebar */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

/* Article vedette */
.blog-vedette-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

/* Sidebar widgets */
.sidebar-widget {
    padding: 1.25rem;
}

.sidebar-widget h4 {
    color: var(--brand-dark);
    border-bottom: 2px solid var(--brand-teal-light);
    padding-bottom: 0.75rem;
}

.sidebar-widget ul li:last-child {
    margin-bottom: 0;
}

.sidebar-widget ul li:last-child a {
    border-bottom: none;
}

/* Badges dark + outline pour filtres */
.site-badge-dark {
    background: var(--brand-dark);
    color: #fff;
    border-radius: 2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.site-badge-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}

.site-badge-outline:hover {
    border-color: var(--brand-teal);
    color: var(--brand-dark);
}

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

    .blog-vedette-inner {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: 2;
    }
}

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

/* ---- Aperçu application (mockup) ---- */
.app-preview {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid rgb(226, 232, 240);
    box-shadow: rgba(0, 76, 76, 0.08) 0px 4px 16px, rgba(0, 0, 0, 0.04) 0px 2px 6px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.app-preview-topbar {
    background: #1e293b;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-preview-dots {
    display: flex;
    gap: 6px;
}

.app-preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

.app-preview-url {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    flex: 1;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.app-preview-body {
    display: grid;
    grid-template-columns: 180px 1fr;
    min-height: 350px;
}

.app-preview-sidebar {
    background: var(--brand-dark);
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
}

.app-preview-nav-item {
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: default;
}

.app-preview-nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-weight: 600;
}

.app-preview-main {
    padding: 1.25rem;
    background: #f8fafc;
}

.app-preview-metric {
    background: var(--bg-card);
    border-radius: 0.6rem;
    padding: 0.85rem;
    border: 1px solid rgb(226, 232, 240);
}

.app-preview-metric-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.3rem;
}

.app-preview-metric-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.app-preview-tool-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid rgb(226, 232, 240);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.app-preview-tool-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.app-preview-status {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 2rem;
}

.app-preview-status.good {
    background: #dcfce7;
    color: #166534;
}

.app-preview-status.warn {
    background: var(--brand-gold-light);
    color: #92400e;
}

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

    .app-preview-sidebar {
        display: none;
    }
}

/* ---- Carrousel screenshots outil ---- */
.screenshot-carousel {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.screenshot-radio {
    display: none;
}

.screenshot-slides {
    position: relative;
    overflow: hidden;
}

.screenshot-slide {
    display: none;
}

.screenshot-slide svg {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: rgba(0, 76, 76, 0.08) 0px 4px 16px;
}

.screenshot-radio:nth-of-type(1):checked ~ .screenshot-slides .screenshot-slide:nth-child(1),
.screenshot-radio:nth-of-type(2):checked ~ .screenshot-slides .screenshot-slide:nth-child(2),
.screenshot-radio:nth-of-type(3):checked ~ .screenshot-slides .screenshot-slide:nth-child(3) {
    display: block;
}

.screenshot-radio:nth-of-type(1):checked ~ .screenshot-captions .screenshot-caption:nth-child(1),
.screenshot-radio:nth-of-type(2):checked ~ .screenshot-captions .screenshot-caption:nth-child(2),
.screenshot-radio:nth-of-type(3):checked ~ .screenshot-captions .screenshot-caption:nth-child(3) {
    display: block;
}

.screenshot-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.screenshot-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.screenshot-radio:nth-of-type(1):checked ~ .screenshot-nav .screenshot-dot:nth-child(1),
.screenshot-radio:nth-of-type(2):checked ~ .screenshot-nav .screenshot-dot:nth-child(2),
.screenshot-radio:nth-of-type(3):checked ~ .screenshot-nav .screenshot-dot:nth-child(3) {
    background: var(--brand-teal);
}

.screenshot-captions {
    text-align: center;
    margin-top: 0.5rem;
}

.screenshot-caption {
    display: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ---- Timeline (page Qui suis-je) ---- */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 2rem auto 0;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--brand-teal);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 1rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--brand-teal);
    border: 3px solid var(--brand-teal-light);
    z-index: 1;
}

.timeline-card {
    padding: 1.25rem;
}

/* ---- Avatar placeholder ---- */
.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--brand-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto;
    letter-spacing: 0.05em;
}

/* ---- Expertise cards ---- */
.expertise-card {
    padding: 1.5rem;
    text-align: center;
}

/* Ecran lecteur */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bg-card);
    border-radius: 6px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
