/* ═══════════════════════════════════════════════
   MÉTALLERIE GODFROY — Feuille de styles complète
   Front-end + Administration
   ═══════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
    --mg-blue: #1A6DB5;
    --mg-blue-dark: #134F85;
    --mg-dark: #0C0C0E;
    --mg-anthracite: #1A1A1E;
    --mg-steel: #2C2C32;
    --mg-light: #F6F7F9;
    --mg-warm: #FAFAF8;
    --mg-border: #E0E2E8;
    --mg-text: #3A3A42;
    --mg-muted: #71717A;
    --radius: 6px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: var(--mg-text);
    line-height: 1.65;
    background: #fff;
    overflow-x: hidden;
}
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 48px; } }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; line-height: 1.1; }


/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10%  { transform: translate(-5%, -10%); }
    30%  { transform: translate(3%, -15%); }
    50%  { transform: translate(-8%, 5%); }
    70%  { transform: translate(9%, -5%); }
    90%  { transform: translate(-3%, 8%); }
}
@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }


/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: 72px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex; align-items: center;
    transition: box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.logo-link {
    text-decoration: none; color: var(--mg-dark);
    display: flex; align-items: center; gap: 12px;
    font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em;
    min-width: 0; /* allow shrink */
    overflow: hidden;
}
.logo-link img { height: 40px; width: auto; flex-shrink: 0; }
.logo-name-img { height: 28px !important; width: auto !important; max-width: 160px; flex-shrink: 0; }

@media (max-width: 480px) {
    .logo-link { font-size: 0.88rem; gap: 8px; }
    .logo-link img { height: 32px; }
    .logo-name-img { height: 22px !important; max-width: 120px; }
}

.header-zone {
    display: none;
    font-size: 0.72rem; font-weight: 500; color: var(--mg-muted);
    letter-spacing: 0.06em; text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid var(--mg-border);
    border-radius: 100px;
}
@media (min-width: 900px) { .header-zone { display: block; } }

.header-nav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-nav > .btn-cta { display: none; }
@media (min-width: 768px) { .header-nav > .btn-cta { display: inline-flex; } }

.nav-link {
    text-decoration: none; color: var(--mg-text);
    font-size: 0.78rem; font-weight: 500; text-transform: uppercase;
    letter-spacing: 0.04em; padding: 8px 14px;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
    display: none;
}
.nav-link:hover { background: var(--mg-light); color: var(--mg-dark); }
@media (min-width: 768px) { .nav-link { display: inline-block; } }


/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: var(--radius);
    background: var(--mg-blue); color: #fff;
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; text-decoration: none;
    border: none; cursor: pointer;
    transition: background 0.3s var(--ease), transform 0.3s var(--ease);
    white-space: nowrap;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.btn-cta:hover { background: var(--mg-blue-dark); transform: translateY(-1px); }
.btn-cta-dark { background: var(--mg-dark); }
.btn-cta-dark:hover { background: var(--mg-anthracite); }
.btn-cta-outline {
    background: transparent; color: var(--mg-dark);
    border: 1.5px solid var(--mg-border);
}
.btn-cta-outline:hover { background: var(--mg-light); border-color: var(--mg-dark); }


/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh; min-height: 100svh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: #fff;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background-position: center; background-size: cover; background-repeat: no-repeat;
    filter: brightness(0.35) contrast(1.1);
}
.hero::after {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 30% 80%, rgba(26, 109, 181, 0.25), transparent 60%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}
.hero::before {
    content: '';
    position: absolute; inset: -50%;
    width: 200%; height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 128px;
    animation: grain 8s steps(10) infinite;
    pointer-events: none; z-index: 1; opacity: 0.5;
}
.hero-content {
    position: relative; z-index: 2;
    padding: 0 20px; max-width: 900px;
}
.hero-badge {
    display: inline-block;
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 20px; border-radius: 100px;
    margin-bottom: 32px;
    animation: fadeIn 1s 0.3s both;
}
.hero h1 {
    font-size: clamp(2.8rem, 8vw, 6.5rem);
    font-weight: 400; line-height: 0.95;
    margin-bottom: 28px;
    animation: fadeUp 1s 0.5s both;
}
.hero h1 em {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
}
.hero-sub {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 520px; margin: 0 auto 40px;
    line-height: 1.6;
    animation: fadeUp 1s 0.7s both;
}
.hero-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    animation: fadeUp 1s 0.9s both;
}
@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: center; gap: 10px; }
    .hero-actions .btn-cta { width: 100%; max-width: 280px; justify-content: center; }
    .hero-badge { font-size: 0.6rem; letter-spacing: 0.12em; padding: 6px 14px; }
    .hero-sub { margin-bottom: 28px; }
}
.hero-scroll {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    z-index: 2; color: rgba(255, 255, 255, 0.4);
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em;
    text-decoration: none;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    animation: fadeIn 1s 1.4s both;
}
.hero-scroll span {
    display: block; width: 1px; height: 40px;
    background: rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}


/* ═══════════════════════════════════════
   SECTION HEADINGS
   ═══════════════════════════════════════ */
.section-label {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.18em; color: var(--mg-blue);
    margin-bottom: 16px;
}
.section-title {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    color: var(--mg-dark); margin-bottom: 20px;
}
.section-sub {
    font-size: 1.05rem; color: var(--mg-muted);
    max-width: 560px; line-height: 1.7;
}


/* ═══════════════════════════════════════
   SERVICES — Grille centrée, pas de vide
   ═══════════════════════════════════════ */
.services-section { padding: 120px 0 140px; background: #fff; }
@media (max-width: 767px) { .services-section { padding: 80px 0 100px; } }

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin-top: 64px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--mg-border);
}

/* Adapt columns to item count — class set by PHP */
.services-grid.cols-1 { grid-template-columns: 1fr; max-width: 340px; margin-left: auto; margin-right: auto; }
.services-grid.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 600px; margin-left: auto; margin-right: auto; }
.services-grid.cols-3 { grid-template-columns: repeat(3, 1fr); max-width: 860px; margin-left: auto; margin-right: auto; }
.services-grid.cols-4 { grid-template-columns: repeat(4, 1fr); max-width: 1080px; margin-left: auto; margin-right: auto; }
.services-grid.cols-5 { grid-template-columns: repeat(5, 1fr); max-width: none; }
.services-grid.cols-6 { grid-template-columns: repeat(3, 1fr); max-width: none; }
.services-grid.cols-7 { grid-template-columns: repeat(4, 1fr); max-width: none; }

.service-card {
    background: #fff;
    padding: 36px 24px;
    text-align: center;
    transition: background 0.4s var(--ease);
    position: relative;
}
.service-card:hover { background: var(--mg-light); }

/* Inner borders via box-shadow — avoids double borders */
.service-card::after {
    content: '';
    position: absolute;
    right: 0; bottom: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    border-right: 1px solid var(--mg-border);
    border-bottom: 1px solid var(--mg-border);
    box-sizing: border-box;
}

.service-icon {
    width: 48px; height: 48px; margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mg-blue), var(--mg-blue-dark));
    color: #fff; font-size: 1.2rem;
}
.service-card h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--mg-dark); margin-bottom: 14px;
}
.service-card p {
    font-size: 0.85rem; color: var(--mg-muted);
    line-height: 1.6; margin: 0;
}

/* ── Tablet ── */
@media (max-width: 1100px) {
    .services-grid.cols-5,
    .services-grid.cols-7 { grid-template-columns: repeat(3, 1fr); max-width: none; }
    .services-grid.cols-4 { grid-template-columns: repeat(2, 1fr); max-width: none; }
    .services-grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
    .services-grid.cols-3 { max-width: none; }
    .services-grid.cols-2 { max-width: none; }
    .services-grid.cols-1 { max-width: none; }
}

/* ── Small tablet / large phone ── */
@media (max-width: 700px) {
    .services-grid[class*="cols-"] {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
    }
    .services-grid.cols-1 { grid-template-columns: 1fr; }
    .service-card { padding: 28px 18px; }
}

/* ── Phone ── */
@media (max-width: 480px) {
    .services-grid[class*="cols-"] {
        grid-template-columns: 1fr;
        max-width: none;
    }
    .service-card::after { border-right: none; }
    .service-card { padding: 28px 20px; }
}


/* ═══════════════════════════════════════
   PORTFOLIO — 5 colonnes strictes
   ═══════════════════════════════════════ */
.portfolio-section { padding: 120px 0 140px; background: var(--mg-warm); }
@media (max-width: 767px) { .portfolio-section { padding: 80px 0 100px; } }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 56px;
    border-radius: 12px;
    overflow: hidden;
}
@media (max-width: 900px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }

.port-item {
    position: relative; aspect-ratio: 1 / 1;
    overflow: hidden; cursor: pointer;
    background: var(--mg-dark);
}
.port-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s var(--ease), opacity 0.6s;
    opacity: 0.85;
}
.port-item:hover img { transform: scale(1.08); opacity: 0.35; }
.port-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: flex-end; padding: 20px;
    pointer-events: none;
}
.port-label {
    color: #fff; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    transform: translateY(10px); opacity: 0;
    transition: transform 0.5s var(--ease), opacity 0.5s;
}
.port-item:hover .port-label { transform: translateY(0); opacity: 1; }

.port-placeholder {
    background: var(--mg-steel);
    display: flex; align-items: center; justify-content: center;
}
.port-placeholder span {
    color: rgba(255, 255, 255, 0.15);
    font-size: 2rem;
}

.portfolio-footer {
    margin-top: 48px;
    display: flex; align-items: center; justify-content: center;
    gap: 16px; flex-wrap: wrap;
}


/* ═══════════════════════════════════════
   CONFIANCE / TRUST
   ═══════════════════════════════════════ */
.trust-section {
    padding: 100px 0; background: var(--mg-dark);
    color: #fff; overflow: hidden; position: relative;
}
.trust-section::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(26, 109, 181, 0.15), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(26, 109, 181, 0.1), transparent 50%);
    pointer-events: none;
}
.trust-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 48px; position: relative; z-index: 1;
}
@media (max-width: 768px) { .trust-grid { grid-template-columns: 1fr; gap: 32px; } }
.trust-item { text-align: center; }
.trust-number {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem); color: var(--mg-blue);
    line-height: 1; margin-bottom: 12px;
}
.trust-item h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.trust-item p {
    font-size: 0.88rem; color: rgba(255, 255, 255, 0.5);
    max-width: 280px; margin: 0 auto;
}


/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */
.contact-section { padding: 120px 0 140px; background: #fff; }
@media (max-width: 767px) { .contact-section { padding: 80px 0 100px; } }

.contact-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 80px; align-items: start; margin-top: 64px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

.contact-phone {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.6rem, 4vw, 3rem);
    color: var(--mg-blue); margin: 24px 0;
    text-decoration: none; display: block;
    word-break: break-word;
}
.contact-phone:hover { color: var(--mg-blue-dark); }
.contact-address {
    font-size: 0.92rem; color: var(--mg-muted);
    line-height: 1.7; margin-bottom: 32px;
}

.contact-form {
    background: var(--mg-light);
    border: 1px solid var(--mg-border);
    border-radius: 12px; padding: 40px;
}
@media (max-width: 480px) {
    .contact-form { padding: 24px 18px; }
}
.form-field {
    width: 100%; padding: 14px 16px; margin-bottom: 16px;
    border: 1.5px solid var(--mg-border); border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
    background: #fff; color: var(--mg-dark);
    transition: border-color 0.3s;
    box-sizing: border-box;
}
.form-field:focus { outline: none; border-color: var(--mg-blue); }
.form-field::placeholder { color: var(--mg-muted); }
.form-label {
    font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    display: block; margin-bottom: 6px; color: var(--mg-text);
}

.captcha-row {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1.5px solid var(--mg-border);
    border-radius: var(--radius); padding: 12px 16px;
    margin-bottom: 20px; font-size: 0.85rem; font-weight: 600;
    flex-wrap: wrap;
}
.captcha-row input {
    width: 70px; padding: 6px 10px;
    border: 1.5px solid var(--mg-border); border-radius: var(--radius);
    font-size: 0.9rem; text-align: center;
    font-family: 'DM Sans', sans-serif;
}
.captcha-row input:focus { outline: none; border-color: var(--mg-blue); }

.form-submit {
    width: 100%; padding: 16px;
    background: var(--mg-blue); color: #fff;
    border: none; border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.form-submit:hover { background: var(--mg-blue-dark); transform: translateY(-1px); }


/* ═══════════════════════════════════════
   MAP
   ═══════════════════════════════════════ */
.map-section iframe {
    display: block; width: 100%; height: 400px;
    border: none; filter: grayscale(0.3);
}


/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer {
    background: var(--mg-dark);
    color: rgba(255, 255, 255, 0.4);
    padding: 48px 0; text-align: center;
    font-size: 0.72rem; letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-footer a { color: var(--mg-blue); text-decoration: none; }


/* ═══════════════════════════════════════
   LIGHTBOX — Parfaitement centré
   ═══════════════════════════════════════ */
dialog#lightbox {
    border: none; background: transparent;
    padding: 0; outline: none;
    max-width: 100vw; max-height: 100vh;
    width: 100vw; height: 100vh;
    position: fixed; inset: 0;
    display: none;
    align-items: center; justify-content: center;
}
dialog#lightbox[open] {
    display: flex;
}
dialog#lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
}
dialog#lightbox img {
    max-width: 92vw; max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}
@media (max-width: 600px) {
    dialog#lightbox img {
        max-width: 96vw; max-height: 80vh;
        border-radius: 4px;
    }
}


/* ═══════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════ */
.flash-msg {
    position: fixed; top: 80px; left: 50%;
    transform: translateX(-50%); z-index: 9999;
    padding: 14px 28px; border-radius: var(--radius);
    font-size: 0.88rem; font-weight: 600;
    animation: fadeUp 0.5s both;
    cursor: pointer;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    text-align: center;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }


/* ═══════════════════════════════════════
   MOBILE NAV
   ═══════════════════════════════════════ */
.mobile-menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: none; border: none; cursor: pointer;
}
.mobile-menu-btn span {
    display: block; width: 20px; height: 2px;
    background: var(--mg-dark);
    position: relative; transition: 0.3s;
}
.mobile-menu-btn span::before,
.mobile-menu-btn span::after {
    content: ''; display: block; width: 20px; height: 2px;
    background: var(--mg-dark);
    position: absolute; left: 0; transition: 0.3s;
}
.mobile-menu-btn span::before { top: -6px; }
.mobile-menu-btn span::after  { top: 6px; }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

.mobile-nav {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column; align-items: center;
    justify-content: center; gap: 24px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    font-size: 1.1rem; font-weight: 700;
    text-transform: uppercase; text-decoration: none;
    color: var(--mg-dark); letter-spacing: 0.04em;
}


/* ═══════════════════════════════════════════════
   ADMIN — Layout
   ═══════════════════════════════════════════════ */
.admin-body {
    background: var(--mg-light);
    display: flex; min-height: 100vh;
}
.admin-sidebar {
    width: 260px; background: var(--mg-dark); color: white;
    padding: 40px 20px; position: fixed; height: 100vh;
    z-index: 100; box-sizing: border-box;
}
.admin-main {
    margin-left: 260px; padding: 48px;
    width: calc(100% - 260px); box-sizing: border-box;
}
.admin-card {
    background: #fff; border-radius: 12px;
    padding: 32px; margin-bottom: 32px;
    border: 1px solid var(--mg-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .admin-sidebar { width: 100%; height: auto; position: relative; padding: 20px; }
    .admin-main { margin-left: 0; width: 100%; padding: 16px; }
    .admin-card { padding: 20px; }
    .admin-tabs { gap: 2px; }
    .admin-tab { padding: 8px 12px; font-size: 0.7rem; }
}


/* ═══════════════════════════════════════════════
   ADMIN — Form Elements
   ═══════════════════════════════════════════════ */
.input-field {
    width: 100%; padding: 12px 14px;
    margin: 6px 0 16px 0;
    border: 1.5px solid var(--mg-border);
    border-radius: var(--radius); font-size: 0.9rem;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}
.input-field:focus { outline: none; border-color: var(--mg-blue); }

.btn {
    display: inline-block; padding: 12px 24px;
    border-radius: var(--radius); font-weight: 700;
    cursor: pointer; border: none;
    text-transform: uppercase; font-size: 0.8rem;
    text-decoration: none; text-align: center;
    transition: background 0.3s var(--ease), transform 0.2s var(--ease);
    font-family: inherit;
}
.btn-primary { background: var(--mg-blue); color: white; }
.btn-primary:hover { background: var(--mg-blue-dark); transform: translateY(-1px); }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }


/* ═══════════════════════════════════════════════
   ADMIN — Tabs
   ═══════════════════════════════════════════════ */
.admin-tabs {
    display: flex; gap: 4px;
    margin-bottom: 32px; flex-wrap: wrap;
}
.admin-tab {
    padding: 10px 20px;
    background: var(--mg-border);
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
    font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    border: none; font-family: inherit;
    color: var(--mg-dark);
    transition: background 0.2s, color 0.2s;
}
.admin-tab.active { background: var(--mg-blue); color: #fff; }
.admin-tab:hover:not(.active) { background: #d0d5dd; }

.tab-content { display: none; }
.tab-content.active { display: block; }


/* ═══════════════════════════════════════════════
   ADMIN — Previews & Helpers
   ═══════════════════════════════════════════════ */
.preview-box {
    display: inline-block;
    padding: 8px;
    background: #f1f5f9;
    border: 2px dashed var(--mg-border);
    border-radius: 8px;
    margin: 8px 0 16px 0;
}
.preview-box img {
    max-height: 80px; max-width: 200px;
    display: block; border-radius: 4px;
}

.field-group { margin-bottom: 18px; }
.field-group label {
    display: block;
    font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
    margin-bottom: 4px; color: #555;
}
.field-group .input-field { margin-top: 0; }

.admin-flash {
    padding: 14px 24px; border-radius: var(--radius);
    margin-bottom: 24px;
    font-weight: 600; font-size: 0.88rem;
    background: #dcfce7; color: #166534;
    border: 1px solid #bbf7d0;
}

.grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

.smtp-hint {
    font-size: 0.72rem; color: #999;
    margin-top: -12px; margin-bottom: 12px;
}
