/*
Theme Name: Mon Thème Custom
Theme URI: https://monsite.com
Author: Ton Nom
Author URI: https://monsite.com
Description: Thème WordPress custom fait from scratch.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mon-theme
Tags: custom, responsive, blog
*/

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary:   #1a1a2e;
    --color-secondary: #16213e;
    --color-accent:    #e94560;
    --color-text:      #333333;
    --color-text-light:#666666;
    --color-bg:        #ffffff;
    --color-bg-alt:    #f8f8f8;
    --color-border:    #e0e0e0;

    --font-heading: 'Georgia', serif;
    --font-body:    'Helvetica Neue', Arial, sans-serif;

    --container-width: 1200px;
    --gutter: 2rem;
    --radius: 6px;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
}

/* =============================================
   TYPOGRAPHIE
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1.25rem; }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--color-primary); }

img, video { max-width: 100%; height: auto; display: block; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; padding: 3rem 0; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: var(--color-primary);
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-branding a {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: bold;
}

.site-title { font-size: 1.5rem; margin: 0; }
.site-description { font-size: .85rem; opacity: .7; margin: 0; }

/* =============================================
   NAVIGATION
   ============================================= */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: rgba(255,255,255,.85);
    font-size: .95rem;
    transition: color .2s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--color-accent); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--color-secondary);
    color: rgba(255,255,255,.7);
    padding: 2rem 0;
    text-align: center;
    font-size: .9rem;
}

.site-footer a { color: var(--color-accent); }

/* =============================================
   CONTENU PRINCIPAL
   ============================================= */
.content-area { width: 100%; }

/* Avec sidebar */
.has-sidebar .content-area { width: 68%; }
.has-sidebar .widget-area  { width: 29%; }

.has-sidebar .site-main .container {
    display: flex;
    gap: 3%;
    align-items: flex-start;
}

/* =============================================
   ARTICLES
   ============================================= */
.post { margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--color-border); }
.post:last-child { border-bottom: none; }

.entry-header { margin-bottom: 1.25rem; }

.entry-meta {
    font-size: .85rem;
    color: var(--color-text-light);
    margin-bottom: .75rem;
}
.entry-meta a { color: var(--color-text-light); }
.entry-meta a:hover { color: var(--color-accent); }

.entry-thumbnail { margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden; }

.entry-content { line-height: 1.8; }
.entry-content > * + * { margin-top: 1.25rem; }
.entry-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding: 1rem 1.5rem;
    background: var(--color-bg-alt);
    margin: 1.5rem 0;
    font-style: italic;
}

/* =============================================
   BOUTONS
   ============================================= */
.btn, button, input[type="submit"] {
    display: inline-block;
    padding: .75rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background .2s, transform .1s;
}
.btn:hover, button:hover, input[type="submit"]:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent); color: #fff; }

/* =============================================
   FORMULAIRES
   ============================================= */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: .65rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-bg);
    transition: border-color .2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(233,69,96,.15);
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}
.pagination a, .pagination span {
    padding: .5rem .9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .9rem;
}
.pagination .current {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

/* =============================================
   WIDGETS
   ============================================= */
.widget { margin-bottom: 2.5rem; }
.widget-title {
    font-size: 1.1rem;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: .4rem 0; border-bottom: 1px solid var(--color-border); }
.widget ul li:last-child { border-bottom: none; }

/* =============================================
   PAGE: FULL WIDTH
   ============================================= */
.page-template-full-width .site-main .container { max-width: 100%; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .has-sidebar .site-main .container { flex-direction: column; }
    .has-sidebar .content-area,
    .has-sidebar .widget-area { width: 100%; }
}

@media (max-width: 600px) {
    :root { --gutter: 1rem; }

    .site-header .container { flex-direction: column; align-items: flex-start; }

    .main-navigation ul { flex-wrap: wrap; gap: .75rem; }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }
}
