/* Polices locales */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v44-latin-regular.woff2') format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Oswald';
    src: url('../fonts/oswald-v57-latin-regular.woff2') format("woff2");
    font-weight: 400;
    font-style: normal;
}

/* Variables globales utilisées dans le reste du CSS : couleurs, polices d'écritures, espacements */
:root {
    /* Palette */
    --color-primary: #b57b41; /* Brun doré */
    --color-secondary: #1f57e6; /* Bleu Dunder Mifflin */
    --color-bg: #eff4fb; /* Blanc bleuté */
    --color-text: #272226; /* Gris très foncé */
    --color-accent: #fff9b1; /* Jaune pâle (Golden Ticket) */

    --color-white: #fff;
    --color-border: #d1d9e6;

    /* Typographie */
    --font-body: "Open Sans", sans-serif;
    --font-heading: "Oswald", "Open Sans", sans-serif;

    /* Espacements */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;

    /* Divers (border-radius, ombrages, transitions) */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-soft: 0 4px 8px rgba(0, 0, 0, 0.06);
}

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

html, body {
    margin: 0;
    padding: 0;
}

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

/* Limite la largeur */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

/* Titres */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-top: var(--space-lg);
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

/* Paragraphes */
p {
    margin: 2rem 1rem;
    max-width: 65ch;
    font-size: 1.25rem;
}

/* Liens */
a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: 0.2s ease;
}

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

a:visited {
    color: var(--color-secondary);
}

/* Focus lors de survol au clavier pour l'accessibilité */
a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

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

/* Header et navigation principale */
header, .site-header {
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: var(--shadow-soft);
}

/* Contenu du header */
.header-top {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slogan {
    text-transform: uppercase;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

/* Logo actif = Home */
.logo a.active img {
    filter: drop-shadow(0 0 6px rgba(181, 123, 65, 0.6));
}

/* Navigation */
.main-nav ul {
    list-style: none;
    margin: 15px;
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-size: 1.25rem;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    color: white;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.main-nav a.active {
    background: var(--color-primary);
}

/* Footer */
footer {
    background: #111827;
    color: var(--color-white);
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    font-size: 1.25rem;
    margin-top: 2rem;
}

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

footer a:hover {
    color: white;
}

.footer-quote {
    max-width: none;
    margin: 1.5rem auto 0;
    text-align: center;
}

/* Page d'accueil -> index.html */
.homepage section {
    background: var(--color-white);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-soft);
}

.dwight-employee {
    margin: 0 auto 1.5rem;
}

.promo-section {
    background: var(--color-accent);
    border-left: 4px solid var(--color-primary);
}

.promo-section img {
    max-width: 600px;
    width: 100%;
    margin: 1rem auto 0;
    border-radius: var(--radius-md);
}

/* Grille des bestsellers */
.bestsellers-grid {
    display: grid;
    gap: var(--space-lg);
}

.product-link {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: 0.2s ease;

    display: flex;
    justify-content: center; /* centre verticalement */
    align-items: center; /* centre horizontalement */

    min-height: 260px; /* hauteur de la carte */
    padding: var(--space-md); /* pour éviter que l’image colle aux bords */
}

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

.product-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

/* Page "Our company" */
.company-section {
    background: white;
    padding: var(--space-md);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--space-lg);
}

.company-section img {
    max-width: 600px;
    width: 100%;
    margin: 1rem auto 0;
    border-radius: var(--radius-md);
}

.office-gallery {
    display: grid;
    gap: var(--space-md);
}

.company-section p {
    max-width: none;
    margin: 1rem 0;
    font-size: 1.1rem;
}

/* Page "Our products" */
.products-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.products-nav a {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--color-border);
    background: white;
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
}

.products-nav a:hover {
    background: var(--color-secondary);
    color: white;
}

.product-category {
    background: white;
    padding: var(--space-md);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--space-lg);
}

.product-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: var(--space-md);
}

.product-item {
    background: var(--color-bg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.product-item img {
    margin: auto; /* centre verticalement */
    max-height: 240px; /* espace respirant */
    width: auto;
    display: block;
}

/* Page "Our team" */
.team-intro {
    background: white;
    padding: var(--space-md);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--space-lg);
}

/* Départements : grandes cartes comme Products */
.team-section {
    background: white;
    padding: var(--space-md);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--space-lg);

    display: grid;
    gap: var(--space-md);
}

/* Titre département pleine largeur */
.team-section > h2 {
    margin: 0 0 1rem;
    grid-column: 1 / -1;
}

/* Harmoniser les paragraphes dans ces cartes */
.team-intro p,
.team-section p,
.employee-card p {
    max-width: none;
    margin: 1rem 0;
    font-size: 1.1rem;
}

/* Cartes employés */
.employee-card {
    background: var(--color-bg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    transition: 0.2s ease;

    display: flex;
    flex-direction: column;
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.12);
}

/* Images employées : tailles maximales */
.employee-card img {
    margin: 0 auto 1rem;
    max-height: 260px;
    width: auto;
    object-fit: cover;
    display: block;
}

/* Page "News" que je n'ai pas terminée -> coming soon... */
.coming-soon-page {
    text-align: center;
    padding: 2rem 1rem;
}

.coming-soon-message {
    background: white;
    padding: var(--space-lg);
    border-radius: 1rem;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: var(--shadow-soft);
}

.site-footer {
    font-size: 1.25rem;
}

/* Responsive pour tablette et desktop */

/* Sur tablette */
@media (min-width: 768px) {

    .header-top {
        flex-direction: row;
        justify-content: space-between;
    }

    .main-nav ul {
        flex-direction: row;
        justify-content: center;
    }

    .bestsellers-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .office-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-list {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Team : 2 colonnes */
    .team-section {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Intro en 2 colonnes */
    .team-intro {
        display: grid;
        grid-template-columns: 2fr 1.5fr;
        gap: var(--space-lg);
        align-items: center;
    }
}

/* Sur ordinateur */
@media (min-width: 1024px) {

    .product-list {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Team : 3 colonnes */
    .team-section {
        grid-template-columns: repeat(3, 1fr);
    }
}