/* ============================================
   TTPSXM — Trouve ton pro à St. Martin
   Shared Stylesheet
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
    /* Primary colors */
    --color-blue: #2C3F7C;
    --color-orange: #F06426;
    --color-white: #FFFFFF;

    /* Blue shades */
    --color-blue-900: #0b1d42;
    --color-blue-800: #1d2f60;
    --color-blue-600: #4765a7;
    --color-blue-300: #afc7e8;
    --color-blue-100: #e9f3fb;
    --color-blue-50: #f5fbfe;

    /* Neutrals */
    --color-gray-900: #1a1a1a;
    --color-gray-700: #4a4a4a;
    --color-gray-500: #7a7a7a;
    --color-gray-300: #c4c4c4;
    --color-gray-100: #f0f0f0;

    /* Typography */
    --font-family: 'Figtree', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Layout */
    --header-height: 72px;
    --container-max: 1200px;
    --container-padding: 1.5rem;
}

/* --- Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-gray-900);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-family);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-orange);
    color: var(--color-white);
    font-size: var(--font-size-base);
    padding: 0.75rem 1.75rem;
    border: 2px solid var(--color-orange);
}

.btn-primary:hover {
    background-color: #d9551e;
    border-color: #d9551e;
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-blue);
    font-size: var(--font-size-base);
    padding: 0.75rem 1.75rem;
    border: 2px solid var(--color-blue);
}

.btn-secondary:hover {
    background-color: var(--color-blue);
    color: var(--color-white);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-blue);
    font-size: var(--font-size-sm);
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
}

.btn-ghost:hover {
    background-color: var(--color-blue-100);
}

/* --- Cards --- */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Logo */
.header-logo img {
    height: 44px;
    width: auto;
}

/* Desktop nav */
.header-nav {
    display: none;
}

.header-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.header-nav a {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-blue-800);
    transition: color 0.2s ease;
    position: relative;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--color-orange);
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-orange);
    border-radius: var(--radius-full);
    transition: width 0.2s ease;
}

.header-nav a:hover::after,
.header-nav a.active::after {
    width: 100%;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-actions .btn-secondary {
    display: none;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    color: var(--color-blue);
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: var(--color-blue-50);
}

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-white);
    z-index: 99;
    padding: var(--space-xl) var(--container-padding);
    overflow-y: auto;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.mobile-menu nav a {
    display: block;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--color-blue-800);
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
}

.mobile-menu nav a:hover {
    background-color: var(--color-blue-50);
    color: var(--color-orange);
}

.mobile-menu .mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-gray-100);
}

.mobile-menu .mobile-menu-actions .btn {
    width: 100%;
    justify-content: center;
}

/* Desktop breakpoint */
@media (min-width: 1024px) {
    .header-nav {
        display: block;
    }

    .header-actions .btn-secondary {
        display: inline-flex;
    }

    .mobile-menu-toggle {
        display: none;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background-color: var(--color-blue-900);
    color: var(--color-white);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

/* Footer brand */
.footer-brand {
    max-width: 280px;
}

.footer-brand img {
    height: 48px;
    width: auto;
    margin-bottom: var(--space-md);
    /* Invert/brighten the logo for dark background */
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: var(--font-size-sm);
    color: var(--color-blue-300);
    line-height: 1.7;
}

/* Footer columns */
.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
}

.footer-column h5 {
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.footer-column nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-column nav a {
    font-size: var(--font-size-sm);
    color: var(--color-blue-300);
    transition: color 0.2s ease;
}

.footer-column nav a:hover {
    color: var(--color-white);
}

/* Social links */
.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--color-blue-800);
    color: var(--color-blue-300);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
    background-color: var(--color-orange);
    color: var(--color-white);
}

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid var(--color-blue-800);
    padding-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-xs);
    color: var(--color-blue-600);
}

.footer-bottom a {
    color: var(--color-blue-300);
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--color-white);
}

/* Footer responsive */
@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    .footer-top {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    min-height: calc(100vh - var(--header-height) - 200px);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    background-color: var(--color-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px var(--color-blue-100);
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-orange {
    color: var(--color-orange);
}

.text-blue {
    color: var(--color-blue);
}

.bg-light {
    background-color: var(--color-blue-50);
}

.cpel-switcher__flag {
    margin-inline-end: 4px;
}
.cpel-switcher__flag img {
    border-radius: 4px;
}
