/* 
   Theme Name: Pepper Only (Legacy Reconstructed)
   Description: A clean, modern implementation of the classic Icy Pixels theme.
*/

/* Police Enabler (relatif à ce dossier styles/) */
@font-face {
    font-family: 'Enabler';
    src: url('font/enablert-webfont.eot');
    src: url('font/enablert-webfont.eot?#iefix') format('embedded-opentype'),
         url('font/enablert-webfont.woff') format('woff'),
         url('font/enablert-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #ff2b44;
    --text-color: #80756e;
    --bg-color: #ffffff;
    --font-main: 'Source Sans Pro', sans-serif;
    --font-serif: 'Merriweather', serif;
    --font-enabler: 'Enabler', var(--font-main);
    --transition-speed: 0.3s;
}

/* 1. Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-color);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* 2. Layout Utilities */
.wrapper {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.text-center {
    text-align: center;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 3. Header */
header#top {
    padding: 40px 0;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logo img {
    max-height: 100px;
}

#primary-nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    justify-content: center;
}

#primary-nav a {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color);
    position: relative;
}

#primary-nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
    margin: 5px auto 0;
}

#primary-nav li.current_page_item a::after,
#primary-nav a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
}

/* 4. Slogan Section */
.slogan-section {
    text-align: center;
    padding: 60px 0 80px;
    max-width: 800px;
    margin: 0 auto;
}

.slogan-title {
    font-size: 80px;
    margin-bottom: 20px;
    font-family: var(--font-enabler);
}

.slogan-separator {
    width: 50px;
    height: 2px;
    background-color: #ebebeb;
    margin: 20px auto;
}

.slogan-text {
    font-size: 18px;
    color: var(--text-color);
    font-weight: 300;
}

/* 5. Portfolio Section */
.portfolio-section {
    padding-bottom: 60px;
}

.portfolio-filter {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 6px 25px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    font-family: var(--font-enabler);
}

.portfolio-filter a {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 500;
    color: #777;
    letter-spacing: 1.5px;
}

.portfolio-filter a.active,
.portfolio-filter a:hover {
    color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
    gap: 0;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    background: #f4f4f4;
    transition: transform var(--transition-speed);
    grid-column: span 1;
    grid-row: span 1;
}

.portfolio-item.width2 {
    grid-column: span 2;
}

.portfolio-item.height2 {
    grid-row: span 2;
}

.portfolio-item.width2.height2 {
    grid-column: span 2;
    grid-row: span 2;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-item.width2 {
        grid-column: span 2;
    }

    .portfolio-item.height2 {
        grid-row: span 2;
    }

    .portfolio-item.width2.height2 {
        grid-column: span 2;
        grid-row: span 2;
    }
}

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

    .portfolio-item.width2,
    .portfolio-item.width2.height2 {
        grid-column: span 1;
    }

    .portfolio-item.height2,
    .portfolio-item.width2.height2 {
        grid-row: span 1;
    }
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
    padding: 20px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform var(--transition-speed);
}

.portfolio-item:hover .portfolio-title {
    transform: translateY(0);
}

.portfolio-meta {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.separator {
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    margin: 15px auto;
}

.portfolio-item.hidden {
    display: none;
}

/* 6. Contact & Footer */
.section-divider {
    border: 0;
    border-top: 1px solid #ebebeb;
    margin: 80px 0;
}

.contact-section {
    text-align: center;
    padding-bottom: 60px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.contact-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
}

.contact-form-message {
    font-size: 16px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 4px;
}

.contact-form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contact-form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-form p {
    margin-bottom: 20px;
    text-align: left;
}

.contact-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    font-family: var(--font-main);
    color: var(--text-color);
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form-submit {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-main);
    color: #fff;
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity var(--transition-speed);
}

.contact-form-submit:hover {
    opacity: 0.9;
}

footer {
    text-align: center;
    padding: 40px 0;
    font-size: 12px;
    color: #ccc;
    border-top: 1px solid #ebebeb;
}

footer p {
    margin-bottom: 10px;
}

footer .highlight {
    color: var(--primary-color);
}

/* 7. Responsive */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    header#top {
        flex-direction: column;
        gap: 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item.width2 {
        grid-column: span 1;
    }

    .slogan-title {
        font-size: 70px;
    }
}
