/*
 Theme Name:   Les Chats de la Sérane
 Theme URI:    https://leschatsdelaserane.fr
 Description:  Thème enfant Astra — Association de protection féline
 Author:       Frédéric Aula
 Template:     astra
 Version:      0.2.0
 Text Domain:  cds-child
*/

/* ==========================================================================
   PALETTE "JARDIN DE PIRATE" — Vert dominant, accents orange abricot
   Extraite des photos de Pirate : herbe vive, pâquerettes, myosotis
   Mousse #f7f9f4 | Prairie #edf2e6 | Forêt #2a3625
   Abricot #e08b3a | Jardin #4d8b31 | Myosotis #7b9bc4 | Cuivre #c97a2d
   ========================================================================== */

:root {
    --cds-mousse: #f7f9f4;
    --cds-prairie: #edf2e6;
    --cds-foret: #2a3625;
    --cds-abricot: #e08b3a;
    --cds-jardin: #4d8b31;
    --cds-myosotis: #7b9bc4;
    --cds-cuivre: #c97a2d;
    --cds-feuille: #2a3625;
    --cds-foret-clair: #3d5a30;
}

/* ==========================================================================
   BASE
   ========================================================================== */

body,
.ast-separate-container,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-separate-container .comment-respond,
.ast-separate-container .ast-comment-list li {
    background-color: var(--cds-mousse) !important;
    color: var(--cds-foret);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
}

/* ==========================================================================
   TITRES — Cardo, chaleureuse et élégante
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title {
    font-family: 'Cardo', Georgia, serif;
    color: var(--cds-foret);
    letter-spacing: 0.02em;
}

h1, .entry-title { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

/* ==========================================================================
   LIENS
   ========================================================================== */

a {
    color: var(--cds-jardin);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--cds-abricot);
}

/* ==========================================================================
   HEADER — Fond mousse, nav uppercase
   ========================================================================== */

.site-header,
.ast-primary-header,
.main-header-bar {
    background-color: var(--cds-mousse) !important;
    border-bottom: 2px solid var(--cds-prairie);
}

.site-title a {
    font-family: 'Cardo', Georgia, serif;
    color: var(--cds-foret) !important;
    font-size: 1.6rem;
}

/* Masquer le titre "Accueil" sur la page d'accueil */
.home .entry-title,
.home .page-title {
    display: none;
}

/* ==========================================================================
   LOGO PIRATE — Petit rond dans le header
   ========================================================================== */

.custom-logo {
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    object-fit: cover;
}

.custom-logo-link {
    display: flex;
    align-items: center;
}

/* ==========================================================================
   NAVIGATION — Compact pour tenir sur une ligne
   ========================================================================== */

.main-navigation,
.main-header-menu a,
.ast-header-navigation a {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
    color: var(--cds-foret) !important;
}

.main-header-menu a:hover,
.ast-header-navigation a:hover {
    color: var(--cds-abricot) !important;
}

/* Lien actif */
.main-header-menu .current-menu-item > a,
.main-header-menu .current_page_item > a {
    color: var(--cds-jardin) !important;
    font-weight: 600;
}

/* Burger menu mobile : couleurs du thème */
.ast-mobile-menu-trigger-minimal .ast-mobile-svg,
.ast-mobile-menu-trigger-fill .ast-mobile-svg,
.menu-toggle .ast-mobile-svg {
    fill: var(--cds-foret) !important;
}

.ast-button-wrap .menu-toggle,
.ast-mobile-menu-buttons .menu-toggle {
    background: var(--cds-abricot) !important;
    border: none !important;
    border-radius: 50% !important;
}

.ast-button-wrap .menu-toggle .ast-mobile-svg,
.ast-mobile-menu-buttons .menu-toggle .ast-mobile-svg {
    fill: #fff !important;
}

.ast-header-break-point .site-header .main-header-bar {
    border-bottom: 2px solid var(--cds-prairie) !important;
}

/* Supprimer tout trait bleu résiduel dans le header mobile */
.ast-primary-header,
.ast-primary-header .ast-builder-grid-row,
.main-header-bar {
    border-bottom-color: var(--cds-prairie) !important;
}

/* Flèche retour en haut — couleurs du thème */
#ast-scroll-top {
    background-color: var(--cds-abricot) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
}

#ast-scroll-top:hover {
    background-color: var(--cds-cuivre) !important;
}

/* ==========================================================================
   BOUTONS — Orange abricot arrondi, hover cuivre
   ========================================================================== */

.button,
button,
input[type="submit"],
.wp-block-button__link,
.wp-element-button {
    background-color: var(--cds-abricot) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 25px !important;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 30px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
    background-color: var(--cds-cuivre) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Bouton secondaire (contour vert) */
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: var(--cds-jardin) !important;
    border: 2px solid var(--cds-jardin) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--cds-jardin) !important;
    color: #fff !important;
}

/* ==========================================================================
   SECTIONS ALTERNÉES — Mousse / Prairie
   ========================================================================== */

.cds-section-prairie,
.ast-separate-container .cds-section-prairie {
    background-color: var(--cds-prairie) !important;
    padding: 60px 20px;
}

.cds-section-mousse {
    background-color: var(--cds-mousse) !important;
    padding: 60px 20px;
}

/* ==========================================================================
   HERO — Pleine largeur, image lumineuse, texte lisible
   ========================================================================== */

.cds-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.cds-hero .wp-block-cover__background {
    opacity: 0 !important;
}

.cds-hero .wp-block-cover__image-background {
    object-position: 70% 20% !important;
}

@media (max-width: 768px) {
    .cds-hero .wp-block-cover__image-background {
        object-position: 80% 10% !important;
    }
}

.cds-hero h1 {
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.5);
    font-size: 3rem;
}

.cds-hero p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
}

.cds-hero .wp-block-button.is-style-outline .wp-block-button__link {
    border-color: #fff !important;
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.cds-hero h1 {
    font-family: 'Cardo', Georgia, serif;
    font-size: 3rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cds-hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

/* ==========================================================================
   CARDS CHATS — Photos arrondies, ombre douce
   ========================================================================== */

.cds-cat-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(42, 54, 37, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cds-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(42, 54, 37, 0.15);
}

.cds-cat-card img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.cds-cat-card-body {
    padding: 20px;
    text-align: center;
}

.cds-cat-card-body h3 {
    font-family: 'Cardo', Georgia, serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--cds-foret);
}

.cds-cat-card-body p {
    font-size: 0.9rem;
    color: var(--cds-foret-clair);
}

/* Badge statut */
.cds-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cds-badge-adoption {
    background-color: var(--cds-jardin);
    color: #fff;
}

.cds-badge-adopte {
    background-color: var(--cds-myosotis);
    color: #fff;
}

/* ==========================================================================
   GRILLE CHATS — 3 colonnes responsive
   ========================================================================== */

.cds-cats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .cds-cats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .cds-cats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SECTION "COMMENT NOUS AIDER" — 3 colonnes icônes
   ========================================================================== */

.cds-help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.cds-help-item {
    padding: 30px 20px;
}

.cds-help-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.cds-help-item h3 {
    font-family: 'Cardo', Georgia, serif;
    color: var(--cds-foret);
    margin-bottom: 10px;
}

.cds-help-item p {
    font-size: 0.9rem;
    color: var(--cds-foret-clair);
}

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

/* ==========================================================================
   FOOTER — Fond vert foncé, texte prairie, 3 colonnes
   ========================================================================== */

.site-footer {
    background-color: var(--cds-feuille) !important;
    color: var(--cds-prairie);
}

.site-footer a {
    color: var(--cds-prairie) !important;
}

.site-footer a:hover {
    color: var(--cds-abricot) !important;
}

/* Masquer "Propulsé par Astra WordPress Theme" */
.site-footer .site-info,
.ast-footer-copyright {
    display: none !important;
}

/* Footer personnalisé CDS */
.cds-footer {
    background-color: var(--cds-feuille);
    padding: 40px 20px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.cds-footer-col h4 {
    font-family: 'Cardo', Georgia, serif;
    color: var(--cds-prairie);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.cds-footer-col p,
.cds-footer-col a {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--cds-prairie) !important;
    opacity: 0.85;
    line-height: 1.8;
}

.cds-footer-col a:hover {
    color: var(--cds-abricot) !important;
    opacity: 1;
}

.cds-footer-copy {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--cds-prairie);
    opacity: 0.5;
    padding: 15px 20px;
    border-top: 1px solid rgba(237, 242, 230, 0.15);
}

@media (max-width: 768px) {
    .cds-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ==========================================================================
   CONTENU — Espaces généreux
   ========================================================================== */

.site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ==========================================================================
   MASQUER MÉTA ARTICLES — "Non classé" + "Frédéric"
   ========================================================================== */

.cat-links,
.entry-meta .cat-links,
.ast-blog-single-element.ast-taxonomy-container {
    display: none !important;
}

.posted-by, .byline, .author.vcard,
.entry-meta .posted-on .published::before {
    display: none !important;
}

/* Masquer "By /" devant la date des articles */
.entry-meta .byline,
.entry-meta .author,
.single .entry-meta .posted-by {
    display: none !important;
}

/* ==========================================================================
   IMAGES — Photos couleur, pas de déformation
   ========================================================================== */

img {
    border-radius: 0;
}

.wp-block-image img,
.wp-block-gallery img {
    border-radius: 8px;
}

.ast-article-post img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: auto;
}

/* ==========================================================================
   SECTION ACTUALITÉS — Page d'accueil
   ========================================================================== */

.wp-block-latest-posts {
    padding: 0;
    list-style: none;
}

.wp-block-latest-posts li {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(42, 54, 37, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-latest-posts li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 54, 37, 0.12);
}

.wp-block-latest-posts__featured-image img {
    border-radius: 8px !important;
    object-fit: cover;
}

.wp-block-latest-posts__post-title {
    font-family: 'Cardo', Georgia, serif;
    font-size: 1.2rem;
    color: var(--cds-foret);
    font-weight: 700;
}

.wp-block-latest-posts__post-date {
    color: var(--cds-jardin);
    font-size: 0.8rem;
    font-weight: 500;
}

.wp-block-latest-posts__post-excerpt {
    color: var(--cds-foret-clair);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==========================================================================
   SÉLECTION TEXTE
   ========================================================================== */

::selection {
    background-color: var(--cds-prairie);
    color: var(--cds-foret);
}

/* ==========================================================================
   SÉPARATEURS
   ========================================================================== */

hr.wp-block-separator {
    border-color: var(--cds-prairie);
    opacity: 0.5;
}

/* ==========================================================================
   NAVIGATION ARTICLES — Français (remplace PREVIOUS/NEXT)
   ========================================================================== */

.nav-previous .ast-left-arrow + span,
.nav-next span:first-child {
    font-size: 0;
    visibility: hidden;
}

.nav-previous .ast-left-arrow + span::after {
    content: 'PRÉCÉDENT';
    font-size: 0.85rem;
    visibility: visible;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-next span:first-child::after {
    content: 'SUIVANT';
    font-size: 0.85rem;
    visibility: visible;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

@media (max-width: 768px) {
    .cds-hero h1 {
        font-size: 2rem;
    }

    .cds-hero p {
        font-size: 1rem;
    }

    h1, .entry-title {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }
}
