/*
Theme Name: Casino Starter
Theme URI: https://casino.ecole-musique-tregor.fr/
Description: Thème casino affilié optimisé SEO
Author: Sophie Martin
Author URI: https://casino.ecole-musique-tregor.fr/a-propos/

Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: casino-starter
*/

/* =============================================
   TABLE DES MATIÈRES
   1. Reset & Base
   2. Header
   3. Typographie (H1, H2, H3)
   4. Zone de contenu
   5. Tables
   6. Listes (OL/UL, Pros/Cons)
   7. Badge "Dernière mise à jour"
   8. Images
   9. Footer
   10. Responsive (768px, 480px)
   ============================================= */

/* =============================================
   1. RESET & BASE
   ============================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

/* =============================================
   2. HEADER
   ============================================= */

.site-header,
#masthead {
    background: linear-gradient(135deg, #D72638 0%, #FFB347 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Layout interne du header — flex horizontal logo / nav */
.site-header .header-inner,
#masthead .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    min-height: 64px;
}

/* Logo et titre du site */
.site-header .site-branding,
#masthead .site-branding {
    padding: 0;
    flex-shrink: 0;
}

.site-header .site-title,
#masthead .site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.site-header .site-title a,
#masthead .site-title a,
.site-header .site-title,
#masthead .site-title {
    color: #ffffff;
    text-decoration: none;
}

.site-header .site-description,
#masthead .site-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    margin: 0;
}

/* Navigation principale */
.main-navigation,
#site-navigation {
    background: transparent;
}

.main-navigation ul,
#site-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0 2rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.main-navigation ul li,
#site-navigation ul li {
    position: relative;
}

.main-navigation ul li a,
#site-navigation ul li a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.main-navigation ul li a:hover,
#site-navigation ul li a:hover {
    text-decoration: underline;
    background: rgba(255, 255, 255, 0.15);
}

/* Navigation primaire — classe utilisée dans header.php */
.primary-nav {
    display: flex;
    align-items: center;
}

.primary-nav ul,
.primary-nav .nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.primary-nav ul li {
    position: relative;
}

.primary-nav ul li a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.primary-nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: underline;
}

/* =============================================
   3. TYPOGRAPHIE
   ============================================= */

/* H1 — Gradient rouge-orange */
h1,
.entry-title {
    background: linear-gradient(135deg, #D72638 0%, #FFB347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* H2 — Rouge foncé avec bordure */
h2 {
    color: #851919;
    font-size: 1.8rem;
    font-weight: 700;
    border-bottom: 3px solid #D72638;
    padding-bottom: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

/* H3 — Brun doré */
h3 {
    color: #6f4c00;
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

/* H4, H5, H6 — Hiérarchie cohérente */
h4 {
    color: #444;
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

h5, h6 {
    color: #555;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Paragraphes */
p {
    margin-bottom: 1.25rem;
}

/* Liens dans le contenu */
.entry-content a,
.post-content a {
    color: #D72638;
    text-decoration: underline;
    text-decoration-color: rgba(215, 38, 56, 0.4);
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.entry-content a:hover,
.post-content a:hover {
    color: #851919;
    text-decoration-color: #851919;
}

/* =============================================
   4. ZONE DE CONTENU
   ============================================= */

.site-content,
#content {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.site-main article,
#main article {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* Contenu de l'article */
.entry-content,
.post-content {
    max-width: 100%;
}

/* Sidebar si présente */
.widget-area {
    padding: 1.5rem;
}

/* =============================================
   5. TABLES
   ============================================= */

/* Wrapper responsive */
.entry-content table,
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Conteneur scroll horizontal pour mobile */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.table-responsive table {
    margin: 0;
    box-shadow: none;
}

/* En-tête de tableau — gradient vert-jaune casino */
.entry-content table thead tr,
.entry-content table tr:first-child,
.post-content table thead tr,
.post-content table tr:first-child {
    background: linear-gradient(135deg, #107C41 0%, #F1C40F 100%);
    color: #ffffff;
    font-weight: 700;
}

.entry-content table th,
.post-content table th {
    padding: 12px 16px;
    text-align: left;
    background: linear-gradient(135deg, #107C41 0%, #F1C40F 100%);
    color: #ffffff;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.entry-content table td,
.post-content table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

/* Lignes alternées (zebra striping) */
.entry-content table tbody tr:nth-child(even),
.post-content table tbody tr:nth-child(even) {
    background-color: #f8f8f8;
}

/* Hover sur les lignes */
.entry-content table tbody tr:hover,
.post-content table tbody tr:hover {
    background-color: #fff5f5;
    transition: background-color 0.15s ease;
}

/* Dernière ligne sans bordure */
.entry-content table tbody tr:last-child td,
.post-content table tbody tr:last-child td {
    border-bottom: none;
}

/* =============================================
   6. LISTES
   ============================================= */

/* Listes ordonnées et non ordonnées */
.entry-content ul,
.entry-content ol,
.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.entry-content li,
.post-content li {
    margin-bottom: 0.4rem;
}

/* Marqueur rouge sur les listes non ordonnées */
.entry-content ul li::marker,
.post-content ul li::marker {
    color: #D72638;
}

.entry-content ol li::marker,
.post-content ol li::marker {
    color: #D72638;
    font-weight: 700;
}

/* Listes Pros (avantages) */
.pros {
    list-style: none;
    padding-left: 0.5rem;
}

.pros li {
    padding-left: 0.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.pros li::before {
    content: "✅ ";
    margin-right: 0.25rem;
}

/* Listes Cons (inconvénients) */
.cons {
    list-style: none;
    padding-left: 0.5rem;
}

.cons li {
    padding-left: 0.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.cons li::before {
    content: "❌ ";
    margin-right: 0.25rem;
}

/* =============================================
   7. BADGE "DERNIÈRE MISE À JOUR"
   ============================================= */

.last-updated {
    display: inline-block;
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
}

.last-updated time {
    font-weight: 600;
    color: #444;
}

/* =============================================
   8. BOUTONS CTA
   ============================================= */

/* Bouton principal rouge */
.btn-casino,
.wp-block-button__link,
a.button,
input[type="submit"] {
    display: inline-block;
    background: #D72638;
    color: #ffffff !important;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 8px rgba(215, 38, 56, 0.35);
    text-align: center;
}

.btn-casino:hover,
.wp-block-button__link:hover,
a.button:hover,
input[type="submit"]:hover {
    background: #b01e2c;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(215, 38, 56, 0.45);
}

/* CTA sticky mobile */
.sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #D72638 0%, #FFB347 100%);
    padding: 1rem 1.5rem;
    z-index: 999;
    text-align: center;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.2);
}

.sticky-cta a {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    display: block;
}

/* =============================================
   9. IMAGES
   ============================================= */

.entry-content img,
.post-content img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
    display: block;
}

/* Images flottantes */
.entry-content .alignleft,
.post-content .alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.entry-content .alignright,
.post-content .alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.entry-content .aligncenter,
.post-content .aligncenter {
    margin: 1rem auto;
}

/* Clearfix après images flottantes */
.entry-content::after,
.post-content::after {
    content: "";
    display: table;
    clear: both;
}

/* =============================================
   10. FOOTER
   ============================================= */

.site-footer,
#colophon {
    background: #1a1a1a;
    color: #aaaaaa;
    padding: 2.5rem 2rem;
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
}

.site-footer a,
#colophon a {
    color: #FFB347;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover,
#colophon a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer .footer-links,
#colophon .footer-links {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.site-footer .footer-disclaimer,
#colophon .footer-disclaimer {
    font-size: 12px;
    color: #666;
    max-width: 800px;
    margin: 1rem auto 0;
    line-height: 1.6;
}

/* =============================================
   11. RESPONSIVE — 768px
   ============================================= */

@media (max-width: 768px) {

    /* Header non sticky sur mobile pour éviter de manger trop d'espace */
    .site-header,
    #masthead {
        position: relative;
    }

    /* Navigation collapse — header-inner passe en colonne sur mobile */
    .site-header .header-inner,
    #masthead .header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .main-navigation ul,
    #site-navigation ul,
    .primary-nav ul,
    .primary-nav .nav-menu {
        padding: 0;
        gap: 0;
        flex-direction: column;
        width: 100%;
    }

    .main-navigation ul li a,
    #site-navigation ul li a,
    .primary-nav ul li a {
        padding: 0.6rem 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Typographie réduite */
    h1,
    .entry-title {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
        margin-top: 2rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    /* Contenu */
    .site-content,
    #content {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .site-main article,
    #main article {
        padding: 1.5rem;
    }

    /* Tables responsive automatique */
    .entry-content table,
    .post-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* CTA sticky visible sur mobile */
    .sticky-cta {
        display: block;
    }

    /* Padding footer réduit */
    .site-footer,
    #colophon {
        padding: 1.5rem 1rem;
    }
}

/* =============================================
   12. RESPONSIVE — 480px
   ============================================= */

@media (max-width: 480px) {

    /* Taille de police de base légèrement réduite */
    html {
        font-size: 15px;
    }

    /* Colonne unique forcée */
    .site-content,
    #content {
        padding: 0 0.75rem;
    }

    .site-main article,
    #main article {
        padding: 1.25rem;
        border-radius: 4px;
    }

    /* H1 encore plus compact */
    h1,
    .entry-title {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Bouton CTA pleine largeur */
    .btn-casino,
    .wp-block-button__link {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Badge mise à jour compact */
    .last-updated {
        font-size: 13px;
        padding: 6px 12px;
    }
}
